GNOME Bugzilla – Bug 646740
gnome-shell logout dialog missing accelerators
Last modified: 2011-04-24 14:30:31 UTC
The logout dialog appears to have a keybinding for Escape to mean Cancel, but neither space nor enter will select Log Out, nor does Tab generate a highlight or change button focus. Enter or space seem like they should be confirmations like everywhere else. I could take or leave the tab thing though. Tested with gnome-shell 2.91.93-1.fc15.
Created attachment 185344 [details] [review] ShellStack: make this an StWidget Derive from StGroup rather than ClutterGroup, so that keyboard focus navigation can pass through it correctly. For the moment, it does not properly handle allocation with respect to borders and padding.
Comment on attachment 185344 [details] [review] ShellStack: make this an StWidget actually, ignore this. I realized while attaching the patches that there was a simpler fix
Created attachment 185346 [details] [review] endSessionDialog: fix keyboard navigation The addition of _backgroundStack to ModalDialog broke focus navigation, because it was interposed between the focus group root and all of the interesting content, but since it isn't an StWidget, st_widget_navigate_focus() was unable to navigate through it. Fix this by moving the focus root to this._dialogLayout (inside the _backgroundStack) instead. Additionally, in EndSessionDialog specifically, _initialKeyFocus wasn't being set until after opening the dialog, so it was ignored. Also fix ModalDialog.popModal() to only remember the currently-focused actor when it's called directly, not when it's called as part of closing the dialog, so that the focus in the EndSessionDialog properly reverts back to _initialKeyFocus each time it's reopened.
I can't comment on the correctness of the patch, but I've tested it and it certainly appears to fix keynav in the logout dialog. Thanks!
Review of attachment 185346 [details] [review]: Works well in testing, code changes generally make sense. ::: js/ui/modalDialog.js @@ +216,3 @@ return; + if (this.state != State.CLOSING) { This doesn't seem to handle the _fadeOutDialog => close case, maybe it's just better to make close null out _savedKeyFocus?
Created attachment 185982 [details] [review] endSessionDialog: fix keyboard navigation re-simplify popModal(), just clear _savedKeyFocus on close()
Review of attachment 185982 [details] [review]: Looks good, still works well in testing. Check to make sure you are still happy with the last part of the commit message.
pushed with fixed commit message Attachment 185982 [details] pushed as 59c3e3a - endSessionDialog: fix keyboard navigation
*** Bug 648109 has been marked as a duplicate of this bug. ***
*** Bug 648141 has been marked as a duplicate of this bug. ***
*** Bug 648191 has been marked as a duplicate of this bug. ***
*** Bug 648536 has been marked as a duplicate of this bug. ***