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 662493 - Put focus on Log Out and Power Off dialog with appropriate button
Put focus on Log Out and Power Off dialog with appropriate button
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.2.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 664039 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-10-23 02:21 UTC by Age Bosma (IRC: Forage)
Modified: 2012-03-12 20:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
PopupBaseMenuItem: don't steal key focus from any actor (1.42 KB, patch)
2011-10-25 20:47 UTC, Rui Matos
none Details | Review
PopupBaseMenuItem: grab key focus only if it's already in our focus group (1.74 KB, patch)
2011-11-16 00:36 UTC, Rui Matos
none Details | Review
boxpointer: Prevent spurious input events while animating (2.50 KB, patch)
2012-01-18 02:45 UTC, Rui Matos
committed Details | Review

Description Age Bosma (IRC: Forage) 2011-10-23 02:21:15 UTC
When using the "Log Out..." option from the Status menu the resulting confirmation dialog does not get focus, nor does the Log Out button.
In other cases, similar dialogs always get focus right after the user action.

It would be more efficient if the Log Out button of the confirmation dialog gets focus right after the user clicks on the log out option in the Status menu. Now you have to navigate to it with your mouse while you want to be there anyway. Putting focus on the button allows you to hit enter on your keyboard right away.
Comment 1 Age Bosma (IRC: Forage) 2011-10-25 20:21:31 UTC
The same goes for the Power Off... dialog by the way.
Comment 2 Rui Matos 2011-10-25 20:47:22 UTC
Created attachment 199970 [details] [review]
PopupBaseMenuItem: don't steal key focus from any actor

Grab the key focus only if the current holder is in our focus group. Otherwise
we might end up stealing the key focus from totally unrelated actors elsewhere
in the UI.

In particular this avoids diverting the key focus away from shell modal
dialogs after activating a menu item. This happens because the menu item gets
a notify::hover after the modal dialog grabs the focus.
Comment 3 Rui Matos 2011-11-14 15:57:02 UTC
*** Bug 664039 has been marked as a duplicate of this bug. ***
Comment 4 Rui Matos 2011-11-16 00:36:28 UTC
Created attachment 201501 [details] [review]
PopupBaseMenuItem: grab key focus only if it's already in our focus group

--

Rebased on master and wrote a clearer commit summary.
Comment 5 Rui Matos 2012-01-18 02:45:44 UTC
Created attachment 205498 [details] [review]
boxpointer: Prevent spurious input events while animating

The hide animation causes hover notifications for the actors inside the
boxpointer. PopupBaseMenuItems, in particular, grab the keyboard focus on
hover notifications to enable keyboard navigation on menus. This, in turn,
breaks modal dialogs' keyboard navigation since key focus is taken away from a
just created dialog when the menu is hiding.

Since input events aren't useful while menus are animating we just prevent
them from propagating.

--
This is a more general fix.

But I'm afraid this might be an even more widespread and general problem with
all kinds of animations. Maybe we should do this event muting at the Tweener
level?
Comment 6 Florian Müllner 2012-03-12 18:13:25 UTC
Review of attachment 205498 [details] [review]:

Grrr, looks like my IRC "review" got lost in network flakiness :(
<fmuellner> rtcm: makes sense
<fmuellner> (thinking about a more general approach sounds like a good idea long-term, but for now that patch should be good)
Comment 7 Rui Matos 2012-03-12 20:10:35 UTC
Thanks

Attachment 205498 [details] pushed as 36804a6 - boxpointer: Prevent spurious input events while animating