fix for #101974 acrobat plugin resize problem, r=pavlov, sr=blizzard,a=asa

This commit is contained in:
serge%netscape.com 2002-03-15 02:37:18 +00:00
Родитель 093940ff41
Коммит e56b81814e
3 изменённых файлов: 17 добавлений и 0 удалений

Просмотреть файл

@ -998,6 +998,7 @@ NS_IMETHODIMP ns4xPluginInstance::SetWindow(nsPluginWindow* window)
// to the actual X window // to the actual X window
window->window = (nsPluginPort *)GTK_XTBIN(mXtBin)->xtwindow; window->window = (nsPluginPort *)GTK_XTBIN(mXtBin)->xtwindow;
gtk_xtbin_resize(mXtBin, window->width, window->height);
#elif defined(MOZ_WIDGET_XLIB) #elif defined(MOZ_WIDGET_XLIB)

Просмотреть файл

@ -451,6 +451,19 @@ gtk_xtbin_set_position (GtkXtBin *xtbin,
gdk_window_move (GTK_WIDGET (xtbin)->window, x, y); gdk_window_move (GTK_WIDGET (xtbin)->window, x, y);
} }
void
gtk_xtbin_resize (GtkWidget *widget,
gint width,
gint height)
{
Arg args[2];
GtkXtBin *xtbin = GTK_XTBIN (widget);
Widget xtwidget = XtWindowToWidget(xtbin->xtdisplay, xtbin->xtwindow);
XtSetArg(args[0], XtNheight, height);
XtSetArg(args[1], XtNwidth, width);
XtSetValues(XtParent(xtwidget), args, 2);
}
static void static void
gtk_xtbin_shutdown (GtkObject *object) gtk_xtbin_shutdown (GtkObject *object)

Просмотреть файл

@ -66,6 +66,9 @@ GtkWidget *gtk_xtbin_new (GdkWindow *parent_window, String *f);
void gtk_xtbin_set_position (GtkXtBin *xtbin, void gtk_xtbin_set_position (GtkXtBin *xtbin,
gint x, gint x,
gint y); gint y);
void gtk_xtbin_resize (GtkWidget *widget,
gint width,
gint height);
typedef struct _XtTMRec { typedef struct _XtTMRec {
XtTranslations translations; /* private to Translation Manager */ XtTranslations translations; /* private to Translation Manager */