[gnome-shell/T27795: 82/138] Allow using the Alt-Tab switcher from the Overview



commit 0ada95fa73fdbdff273ae835fd32907405cf4180
Author: Mario Sanchez Prada <mario endlessm com>
Date:   Wed Jun 7 21:23:12 2017 +0100

    Allow using the Alt-Tab switcher from the Overview
    
    This enables using the switcher both from the windows picker and
    the desktop (i.g. icon grid), which are rendered in overview mode.
    
    Besides, this patch also makes sure that the overview gets hidden
    when selecting and application via the Alt-Tab switcher, so that
    it gets properly shown on top of the desktop in any case.

 js/ui/altTab.js        |  6 ++++--
 js/ui/windowManager.js | 30 ++++++++++++++++++++----------
 2 files changed, 24 insertions(+), 12 deletions(-)
---
diff --git a/js/ui/altTab.js b/js/ui/altTab.js
index 4cf18e672d..f8a52e4987 100644
--- a/js/ui/altTab.js
+++ b/js/ui/altTab.js
@@ -277,10 +277,12 @@ class AppSwitcherPopup extends SwitcherPopup.SwitcherPopup {
 
     _finish(timestamp) {
         let appIcon = this._items[this._selectedIndex];
-        if (this._currentWindow < 0)
+        if (this._currentWindow < 0) {
             appIcon.app.activate_window(appIcon.cachedWindows[0], timestamp);
-        else if (appIcon.cachedWindows[this._currentWindow])
+            Main.overview.hide();
+        } else if (appIcon.cachedWindows[this._currentWindow]) {
             Main.activateWindow(appIcon.cachedWindows[this._currentWindow], timestamp);
+        }
 
         super._finish(timestamp);
     }
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
index f1c2814667..9b538580bc 100644
--- a/js/ui/windowManager.js
+++ b/js/ui/windowManager.js
@@ -1160,34 +1160,44 @@ var WindowManager = class {
                                         Shell.ActionMode.NORMAL,
                                         this._showWorkspaceSwitcher.bind(this));
         this.setCustomKeybindingHandler('switch-applications',
-                                        Shell.ActionMode.NORMAL,
+                                        Shell.ActionMode.NORMAL |
+                                        Shell.ActionMode.OVERVIEW,
                                         this._startSwitcher.bind(this));
         this.setCustomKeybindingHandler('switch-group',
-                                        Shell.ActionMode.NORMAL,
+                                        Shell.ActionMode.NORMAL |
+                                        Shell.ActionMode.OVERVIEW,
                                         this._startSwitcher.bind(this));
         this.setCustomKeybindingHandler('switch-applications-backward',
-                                        Shell.ActionMode.NORMAL,
+                                        Shell.ActionMode.NORMAL |
+                                        Shell.ActionMode.OVERVIEW,
                                         this._startSwitcher.bind(this));
         this.setCustomKeybindingHandler('switch-group-backward',
-                                        Shell.ActionMode.NORMAL,
+                                        Shell.ActionMode.NORMAL |
+                                        Shell.ActionMode.OVERVIEW,
                                         this._startSwitcher.bind(this));
         this.setCustomKeybindingHandler('switch-windows',
-                                        Shell.ActionMode.NORMAL,
+                                        Shell.ActionMode.NORMAL |
+                                        Shell.ActionMode.OVERVIEW,
                                         this._startSwitcher.bind(this));
         this.setCustomKeybindingHandler('switch-windows-backward',
-                                        Shell.ActionMode.NORMAL,
+                                        Shell.ActionMode.NORMAL |
+                                        Shell.ActionMode.OVERVIEW,
                                         this._startSwitcher.bind(this));
         this.setCustomKeybindingHandler('cycle-windows',
-                                        Shell.ActionMode.NORMAL,
+                                        Shell.ActionMode.NORMAL |
+                                        Shell.ActionMode.OVERVIEW,
                                         this._startSwitcher.bind(this));
         this.setCustomKeybindingHandler('cycle-windows-backward',
-                                        Shell.ActionMode.NORMAL,
+                                        Shell.ActionMode.NORMAL |
+                                        Shell.ActionMode.OVERVIEW,
                                         this._startSwitcher.bind(this));
         this.setCustomKeybindingHandler('cycle-group',
-                                        Shell.ActionMode.NORMAL,
+                                        Shell.ActionMode.NORMAL |
+                                        Shell.ActionMode.OVERVIEW,
                                         this._startSwitcher.bind(this));
         this.setCustomKeybindingHandler('cycle-group-backward',
-                                        Shell.ActionMode.NORMAL,
+                                        Shell.ActionMode.NORMAL |
+                                        Shell.ActionMode.OVERVIEW,
                                         this._startSwitcher.bind(this));
         this.setCustomKeybindingHandler('switch-panels',
                                         Shell.ActionMode.NORMAL |


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