Bug 265983. GTK1 needs GetNativeData(NS_NATIVE_WIDGET) to be passed as the native parent, not NS_NATIVE_WINDOW. r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@164667 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
76ea752fd1
commit
5376e448a8
@ -628,7 +628,7 @@ nsresult nsIView::CreateWidget(const nsIID &aWindowIID,
|
||||
nsIWidget* parentWidget = GetParent() ? GetParent()->GetNearestWidget(nsnull)
|
||||
: nsnull;
|
||||
if (aWidgetInitData->mWindowType == eWindowType_popup) {
|
||||
mWindow->Create(parentWidget->GetNativeData(NS_NATIVE_WINDOW), trect,
|
||||
mWindow->Create(parentWidget->GetNativeData(NS_NATIVE_WIDGET), trect,
|
||||
::HandleEvent, dx, nsnull, nsnull, aWidgetInitData);
|
||||
} else {
|
||||
mWindow->Create(parentWidget, trect,
|
||||
|
||||
@ -1858,11 +1858,11 @@ NS_METHOD nsWindow::CreateNative(GtkObject *parentWidget)
|
||||
superwin = GDK_SUPERWIN(parentWidget);
|
||||
GdkWindow *topGDKWindow =
|
||||
gdk_window_get_toplevel(GDK_SUPERWIN(parentWidget)->shell_window);
|
||||
gpointer data;
|
||||
gdk_window_get_user_data(topGDKWindow, &data);
|
||||
if (GTK_IS_WINDOW(data)) {
|
||||
topLevelParent = GTK_WINDOW(data);
|
||||
}
|
||||
gpointer data;
|
||||
gdk_window_get_user_data(topGDKWindow, &data);
|
||||
if (GTK_IS_WINDOW(data)) {
|
||||
topLevelParent = GTK_WINDOW(data);
|
||||
}
|
||||
}
|
||||
else if (GTK_IS_CONTAINER(parentWidget)) {
|
||||
parentContainer = GTK_CONTAINER(parentWidget);
|
||||
@ -1870,10 +1870,9 @@ NS_METHOD nsWindow::CreateNative(GtkObject *parentWidget)
|
||||
topLevelParent =
|
||||
GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(parentWidget)));
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
g_print("warning: attempted to CreateNative() width a non-superwin and non gtk container parent\n");
|
||||
#endif
|
||||
else {
|
||||
NS_WARNING("Unknown parent widget type");
|
||||
}
|
||||
}
|
||||
|
||||
switch(mWindowType)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user