[gnome-shell/eos3.8: 68/255] Allow using the Alt-Tab switcher from the Overview



commit 7c5d7bf3111f66b0c6c7589e9289251222a5fe61
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 94b80f7920..277200c266 100644
--- a/js/ui/altTab.js
+++ b/js/ui/altTab.js
@@ -271,10 +271,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 c26d1e1ef6..d1fe6f8f89 100644
--- a/js/ui/windowManager.js
+++ b/js/ui/windowManager.js
@@ -1020,34 +1020,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]