After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 731514 - Nested submenus can't be opened (regression)
Nested submenus can't be opened (regression)
Status: RESOLVED OBSOLETE
Product: gnome-shell
Classification: Core
Component: general
3.10.x
Other Linux
: Normal minor
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2014-06-11 10:34 UTC by Jonas Kümmerlin
Modified: 2021-07-05 14:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test case: create nested submenus as app menu (1.79 KB, text/plain)
2014-06-11 10:34 UTC, Jonas Kümmerlin
  Details
tests/gapplication: Add nested submenu in app menu (1.24 KB, patch)
2014-06-13 14:06 UTC, Jonas Kümmerlin
none Details | Review
popupMenu: fix _setOpenedSubmenu for nested submenus (4.04 KB, patch)
2014-06-13 14:06 UTC, Jonas Kümmerlin
none Details | Review
remoteMenu: fix RequestSubMenu for automatically closed submenus (1.49 KB, patch)
2014-06-13 14:07 UTC, Jonas Kümmerlin
none Details | Review
updated patch about test case(tests/interactive/gapplication.js) against current gnome-shell (1.58 KB, patch)
2018-06-12 05:18 UTC, Kentaro Hayashi
none Details | Review
updated patch about popupMenu.js against current gnome-shell (4.36 KB, patch)
2018-06-12 05:19 UTC, Kentaro Hayashi
none Details | Review
Update patch about remoteMenu.js against current gnome-shell (2.28 KB, patch)
2018-06-12 05:20 UTC, Kentaro Hayashi
none Details | Review

Description Jonas Kümmerlin 2014-06-11 10:34:23 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.
Comment 1 Florian Müllner 2014-06-11 11:25:54 UTC
(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?
Comment 2 Jonas Kümmerlin 2014-06-13 14:06:43 UTC
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
Comment 3 Jonas Kümmerlin 2014-06-13 14:06:51 UTC
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
Comment 4 Jonas Kümmerlin 2014-06-13 14:07:02 UTC
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.
Comment 5 Kentaro Hayashi 2018-06-12 05:18:01 UTC
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.
Comment 6 Kentaro Hayashi 2018-06-12 05:19:43 UTC
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.
Comment 7 Kentaro Hayashi 2018-06-12 05:20:50 UTC
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.
Comment 8 Kentaro Hayashi 2018-06-12 05:34:14 UTC
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.
Comment 9 Kentaro Hayashi 2018-06-19 01:55:37 UTC
(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?
Comment 10 GNOME Infrastructure Team 2021-07-05 14:17:37 UTC
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.