From 349c642d1071656682a7a27c365934884a445be9 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 4 Dec 2012 13:46:47 -0500 Subject: [PATCH] ctrlAltTab: Add a "Windows" option to Ctrl+Alt+Tab This lets accessibility users easily access the desktop after focusing the panel. https://bugzilla.gnome.org/show_bug.cgi?id=689653 --- js/ui/ctrlAltTab.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/js/ui/ctrlAltTab.js b/js/ui/ctrlAltTab.js index 215a72271..a6c22eda4 100644 --- a/js/ui/ctrlAltTab.js +++ b/js/ui/ctrlAltTab.js @@ -26,6 +26,9 @@ const CtrlAltTabManager = new Lang.Class({ _init: function() { this._items = []; + this.addGroup(global.window_group, _("Windows"), + 'emblem-documents-symbolic', { sortGroup: SortGroup.TOP, + focusCallback: Lang.bind(this, this._focusWindows) }); }, addGroup: function(root, name, icon, params) { @@ -121,6 +124,12 @@ const CtrlAltTabManager = new Lang.Class({ this._popup = null; })); } + }, + + _focusWindows: function(timestamp) { + global.set_stage_input_mode(Shell.StageInputMode.NORMAL); + global.stage.key_focus = null; + global.screen.focus_default_window(timestamp); } });