Skip to content
Snippets Groups Projects
Commit 3731b70c authored by Brian Tarricone's avatar Brian Tarricone
Browse files

Fix apps menu not popping up when menu icons disabled

When disabling menu icons, it causes the menu to stop loading and
reload.  Unfortunately, this changes the behavior of gtk_widget_show(),
which usually waits for the menu's initial load to complete before
returning.  Since the no-icons reload is not the initial load, it
doesn't wait.

This fix creates the menu by *first* setting the show-menu-icons
property before setting the GarconMenu, the latter of which is what
triggers the initial menu load.  This way, gtk_widget_show() will always
wait for the menu to be populated, regardless of the icons setting.
parent 5a194f38
No related branches found
No related tags found
2 merge requests!81Fix apps menu not popping up when menu icons disabled,!80Fix apps menu not popping up when menu icons disabled
Pipeline #19263 passed
......@@ -70,9 +70,11 @@ menu_populate(GtkMenuShell *menu, gint scale_factor)
if(garcon_menu == NULL) {
garcon_menu = garcon_menu_new_applications();
}
desktop_menu = garcon_gtk_menu_new (garcon_menu);
desktop_menu = g_object_new(GARCON_GTK_TYPE_MENU,
"show-menu-icons", show_desktop_menu_icons,
"menu", garcon_menu,
NULL);
XF_DEBUG("show desktop menu icons %s", show_desktop_menu_icons ? "TRUE" : "FALSE");
garcon_gtk_menu_set_show_menu_icons(GARCON_GTK_MENU(desktop_menu), show_desktop_menu_icons);
/* check to see if the menu is empty. if not, add the desktop menu
* to a submenu */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment