Menu loading behavior seems to have changed between 4.16 and 4.18
In 4.16, calling gtk_widget_show()
on the GarconGtkMenu
would block until the menu items were fully loaded and populated (if they hadn't been already). That way, when xfdesktop would call gtk_widget_get_children()
on the menu to ensure that there's actually something to display, it would see items in the menu. In 4.18, however, _get_children()
returns NULL
(but, strangely, only when menu icons are disabled), so xfdesktop does not pop up the menu.
Even if xfdesktop ignores whether or not there are items in the menu, the result is still undesirable: because the menu is only partially populated by the time gtk calculates the menu's size, it ends up too small (only 7 items showing in my case) with up/down scroll arrows, which looks ugly and shouldn't be necessary.
The strange bit is that for some reason this problem only occurs when menu icons are disabled; when menu icons are enabled, the menu is populated by the time gtk_widget_show()
returns (or perhaps before that time, unknown), so the menu is shown properly.
I think one of two things would solve this issue:
- Ensure that the menu is loaded and populated (at least the top level) by the time
gtk_wigdet_show()
returns in all cases (which, from a reading of the code, seems like it should already be the case), or - Provide something like a "menu-loading-complete" signal, as well as a
garcon_gtk_menu_is_loaded()
function, so xfdesktop can wait until it's populated before showing it.
I would generally prefer the first option, as the second requires more work on xfdesktop's side, and is, in general, unexpected behavior from a widget.