[gnome-shell] ctrlAltTab: Add a "Windows" option to Ctrl+Alt+Tab



commit 349c642d1071656682a7a27c365934884a445be9
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Dec 4 13:46:47 2012 -0500

    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 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/ctrlAltTab.js b/js/ui/ctrlAltTab.js
index 215a722..a6c22ed 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);
     }
 });
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]