Bug 1176109 - Don't attach menu popups to menubars on GTK3. r=karlt
authorAndrew Comminos <acomminos@mozilla.com>
Mon, 06 Jul 2015 21:55:00 +0200
changeset 251672 89ef09135c286244cde0ec474fc971fb4105f70b
parent 251671 f83eddcbebbc4c2c9554bb2a929f0f25bc6c563d
child 251673 0fa40c837b5345fca7b423a9a39180b5dd018789
push id61923
push usercbook@mozilla.com
push dateTue, 07 Jul 2015 08:28:04 +0000
treeherdermozilla-inbound@2c988eb3e59c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt
bugs1176109
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1176109 - Don't attach menu popups to menubars on GTK3. r=karlt
widget/gtk/gtk3drawing.c
widget/gtk/mozgtk/mozgtk.c
--- a/widget/gtk/gtk3drawing.c
+++ b/widget/gtk/gtk3drawing.c
@@ -569,20 +569,20 @@ ensure_menu_bar_item_widget()
     }
     return MOZ_GTK_SUCCESS;
 }
 
 static gint
 ensure_menu_popup_widget()
 {
     if (!gMenuPopupWidget) {
-        ensure_menu_bar_item_widget();
+        ensure_window_widget();
         gMenuPopupWidget = gtk_menu_new();
-        gtk_menu_item_set_submenu(GTK_MENU_ITEM(gMenuBarItemWidget),
-                                  gMenuPopupWidget);
+        gtk_menu_attach_to_widget(GTK_MENU(gMenuPopupWidget), gProtoWindow,
+                                  NULL);
         gtk_widget_realize(gMenuPopupWidget);
     }
     return MOZ_GTK_SUCCESS;
 }
 
 static gint
 ensure_menu_item_widget()
 {
--- a/widget/gtk/mozgtk/mozgtk.c
+++ b/widget/gtk/mozgtk/mozgtk.c
@@ -255,16 +255,17 @@ STUB(gtk_invisible_new)
 STUB(gtk_key_snooper_install)
 STUB(gtk_key_snooper_remove)
 STUB(gtk_label_get_type)
 STUB(gtk_label_new)
 STUB(gtk_label_set_markup)
 STUB(gtk_link_button_new)
 STUB(gtk_main_do_event)
 STUB(gtk_main_iteration)
+STUB(gtk_menu_attach_to_widget)
 STUB(gtk_menu_bar_new)
 STUB(gtk_menu_get_type)
 STUB(gtk_menu_item_get_type)
 STUB(gtk_menu_item_new)
 STUB(gtk_menu_item_new_with_label)
 STUB(gtk_menu_item_set_submenu)
 STUB(gtk_menu_new)
 STUB(gtk_menu_shell_append)