GNOME Bugzilla – Bug 731514
Nested submenus can't be opened (regression)
Last modified: 2021-07-05 14:17:37 UTC
Created attachment 278257 [details] Test case: create nested submenus as app menu When you try to open a nested submenu, it will close the outer submenu. This is a regression introduced by 5c036eadf944cb06d792c0b5210e0928342a548a While one might argue that nested submenus shouldn't happen and that they don't appear in gnome-shell code, nothing stops a 3rd party app developer from building it as app menu that is supposed to be displayed correctly by the shell (and, my extension for supporting AppIndicators/KStatusNotifierItems ran into that exact problem with indicators out in the wild). A test case is attached. I'm trying to create a patch as soon as I get gnome-shell to build.
(In reply to comment #0) > Created an attachment (id=278257) [details] > Test case: create nested submenus as app menu Can you do a patch to tests/interactive/gapplication.js?
Created attachment 278410 [details] [review] tests/gapplication: Add nested submenu in app menu Nested submenus are not used in gnome-shell, but might appear as app menu. This exposes
Created attachment 278411 [details] [review] popupMenu: fix _setOpenedSubmenu for nested submenus Saving the currently opened submenu once per toplevel menu is incorrect, because when a nested submenu is being opened, both the outer and the inner menu must be opened at the same time (which the old implementation prevented). Saving the currently opened submenu separately for each menu level enables the intended behavior. Fixes
Created attachment 278412 [details] [review] remoteMenu: fix RequestSubMenu for automatically closed submenus When closing a toplevel menu, every opened submenu will be closed by the menu system by calling PopupBaseMenu::close. The RequestSubMenu class still believes the submenu to be open and will return an incorrect value in the _getOpenState method. The visible outcome is that the user has to click the submenu twice to open it again.
Created attachment 372645 [details] [review] updated patch about test case(tests/interactive/gapplication.js) against current gnome-shell updated patch about test case(tests/interactive/gapplication.js) against current gnome-shell. See https://bugzilla.gnome.org/attachment.cgi?id=278410 about original patch.
Created attachment 372646 [details] [review] updated patch about popupMenu.js against current gnome-shell Updated patch about popupMenu.js against current gnome-shell. See https://bugzilla.gnome.org/attachment.cgi?id=278411 about original patch.
Created attachment 372647 [details] [review] Update patch about remoteMenu.js against current gnome-shell Update patch about remoteMenu.js against current gnome-shell. See https://bugzilla.gnome.org/attachment.cgi?id=278412 about the original patch.
I've attached 3 updated patch files. https://bugzilla.gnome.org/attachment.cgi?id=278410 https://bugzilla.gnome.org/attachment.cgi?id=278411 https://bugzilla.gnome.org/attachment.cgi?id=278412 These files are originally written by Jonas Kümmerlin, but couldn't apply to current gnome-shell, so I've updated. https://bugzilla.gnome.org/show_bug.cgi?id=731514#c2 https://bugzilla.gnome.org/show_bug.cgi?id=731514#c3 https://bugzilla.gnome.org/show_bug.cgi?id=731514#c4 This bug affects user application. For example, IBus engine applications. IBus engine sometimes needs some kind of nested submenus to group language specific menus. so if this bug will not be fixed, IBus engine implementation is restricted and need to change implementation for GNOME if you want to support both of GNOME and XFCE because this bug doesn't affect on XFCE. I've filed a bug to https://gitlab.gnome.org/GNOME/gnome-shell/issues/335 because I have a doubt but not confirmed it is derived from Bug 731514 at that time.
(In reply to Jonas Kümmerlin from comment #4) > Created attachment 278412 [details] [review] [review] Hi, Jonas. If you still have interest in this issue, could you send merge request to https://gitlab.gnome.org/GNOME/gnome-shell?
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/ Thank you for your understanding and your help.