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 735614 - Improve popup-menu keynav
Improve popup-menu keynav
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2014-08-28 16:48 UTC by Florian Müllner
Modified: 2014-08-28 17:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
popupMenu: Handle key-press events on sourceActor (3.74 KB, patch)
2014-08-28 16:48 UTC, Florian Müllner
committed Details | Review
popupMenu: Use an appropriate key to move focus into the menu (2.05 KB, patch)
2014-08-28 16:48 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2014-08-28 16:48:33 UTC
See patches. This fixes keynav issues with non-top-bar menus like the GDM session menu and the message tray button (when navigation to the button itself works, see bug 707799).
Comment 1 Florian Müllner 2014-08-28 16:48:36 UTC
Created attachment 284721 [details] [review]
popupMenu: Handle key-press events on sourceActor

The behavior of opening/closing/navigating a menu from its source
actor is generic enough to not limit it to PanelMenu.Buttons, so
move the code into PopupMenu itself.
Comment 2 Florian Müllner 2014-08-28 16:48:42 UTC
Created attachment 284722 [details] [review]
popupMenu: Use an appropriate key to move focus into the menu

The code from PanelMenu.Button assumed menus would open below their
source actor, making KEY_Down a good choice; however with the new
generic code, we should base the key used on the actual menu position.
Comment 3 Jasper St. Pierre (not reading bugmail) 2014-08-28 16:52:36 UTC
Review of attachment 284721 [details] [review]:

Makes sense to me.
Comment 4 Jasper St. Pierre (not reading bugmail) 2014-08-28 16:53:46 UTC
Review of attachment 284722 [details] [review]:

Couldn't it make sense to recognize all four at the same time? So when the menu pops up below the source actor, pressing Up goes to the last item in the menu? This is what GTK+ does.
Comment 5 Florian Müllner 2014-08-28 17:13:16 UTC
Attachment 284721 [details] pushed as 1d58ea2 - popupMenu: Handle key-press events on sourceActor
Attachment 284722 [details] pushed as 98847f2 - popupMenu: Use an appropriate key to move focus into the menu

(In reply to comment #4)
> Couldn't it make sense to recognize all four at the same time?

No. In the top bar, left/right should move to the previous/next button, not navigate into the menu.


> So when the menu pops up below the source actor, pressing Up goes to the last item in the menu?
> This is what GTK+ does.

GTK+ also wraps around when navigating with arrow keys, which we don't do.

I don't really mind handling both up/down for top/bottom menus (not left/right, see above) eventually, but at this point in the cycle I'd rather not do any ad-hoc behavior changes.