Bug 983843 - Switch to GtkOffscreenWindow for drag source widget, fixing ghost tabs on some GTK versions. r=karlt

--HG--
extra : rebase_source : 278ba83eed30b1ff7d0824822a6ab6518f3313f7
This commit is contained in:
Andrew Comminos 2015-06-17 12:20:00 +02:00
parent b6a6d26147
commit e47140908b
2 changed files with 6 additions and 0 deletions

View File

@ -504,6 +504,7 @@ STUB(gtk_get_major_version)
STUB(gtk_get_micro_version)
STUB(gtk_get_minor_version)
STUB(gtk_menu_button_new)
STUB(gtk_offscreen_window_new)
STUB(gtk_paned_new)
STUB(gtk_render_activity)
STUB(gtk_render_arrow)

View File

@ -102,7 +102,12 @@ nsDragService::nsDragService()
obsServ->AddObserver(this, "quit-application", false);
// our hidden source widget
#if (MOZ_WIDGET_GTK == 2)
mHiddenWidget = gtk_window_new(GTK_WINDOW_POPUP);
#else
// Using an offscreen window works around bug 983843.
mHiddenWidget = gtk_offscreen_window_new();
#endif
// make sure that the widget is realized so that
// we can use it as a drag source.
gtk_widget_realize(mHiddenWidget);