GNOME Bugzilla – Bug 671121
Escape key should leave top bar when it has keyboard focus
Last modified: 2017-11-01 19:54:01 UTC
After focusing the panel with Ctrl+Alt+Tab, there's no easy way "leave" it and give again focus to the current window.
Created attachment 208777 [details] [review] panel: leave the panel when pressing Escape Once the panel has keyboard focus, there is currently no easy way to leave it with keyboard only. The behavior introduced here is to focus the MRU window when pressing Escape, or simply to hide the overview if it is visible.
Maybe ctrl-alt-tab should show "Windows" like it does in the overview for getting back.
Created attachment 209365 [details] [review] main: add a 'Windows' item to CtrlAltTab also outside of overview There is currently no intuitive way to leave the panel once it gets keyboard focus, so add this one. Moreover, the CtrlAltTab popup with only one element is weird.
Review of attachment 209365 [details] [review]: ::: js/ui/main.js @@ +251,3 @@ } + let dummyWindowGroupWidget = new St.Widget({ name: 'dummyWindowGroupWidget' }); In practice it probably won't matter but I think it's better to set opacity: 0. @@ +273,3 @@ +function _focusWindowGroup() { + let screen = global.screen; + let display = screen.get_display(); Just use global.display.
Review of attachment 208777 [details] [review]: I think this behavior is still useful and both patches could be merged.
Review of attachment 209365 [details] [review]: It would be nice if the switcher showed up initially like +------+ | W [P]| +------+ and when changing from the panel (P) to windows (W) like +------+ | P [W]| +------+
Created attachment 210010 [details] [review] main, panel: add a way to leave the panel after it gets keyboard focus There is currently no intuitive way to leave the panel once it gets keyboard focus. The behavior introduced here is to focus the MRU window when: * hitting Escape * choosing a newly added 'Windows' entry from Ctrl-Alt-Tab popup -- Merged the two patches and amended, and thanks for review :) As for your suggestion of changing the order of icons in the popup, I'm not sure about it, for two reasons: 1. in the overview the order is fixed, and try to mirror the order of the elements in the screen. 2. outside the overview, the Ctrl-Alt-Tab popup might contain icons for windows in the MetaTabList.DOCKS list (again in fixed order): it seems odd to arrange only _some_ icons according to recent usage. And changing this behavior can be left for another bug.
Review of attachment 210010 [details] [review]: This would have to be updated to work with the new session mode stuff, and a bunch of other fancy new improvements, but sure. ::: js/ui/main.js @@ +261,3 @@ + opacity: 0 }); + uiGroup.add_actor(dummyWindowGroupWidget); + ctrlAltTabManager.addGroup(dummyWindowGroupWidget, _("Windows"), 'text-x-generic', Given how many dummy groups we have, I wonder if it would just be better to modify CtrlAltYabManager to just accept null. @@ +263,3 @@ + ctrlAltTabManager.addGroup(dummyWindowGroupWidget, _("Windows"), 'text-x-generic', + { sortGroup: CtrlAltTab.SortGroup.TOP, + focusCallback: focusWindowGroup }); You can use the "proxy" parameter to give a fake mapped variable, instead of this thing.
Oh, I knew there was something like this already somewhere. Jasper has just re-implemented the windows item part of this in bug 689653. Returning the focus to the windows using Escape would still be nice though.
Any chance you can update the patch, Stefano?
Created attachment 362775 [details] [review] panel: focus windows on Escape key press Here it goes :) But it's totally untested, I can't easily rebuild the shell right now.
Review of attachment 362775 [details] [review]: Commit message could be better, but *shrug* - code looks good (and works as advertised)
Attachment 362775 [details] pushed as feed029 - panel: focus windows on Escape key press