[gnome-shell] switcherPopup: Cancel window cycling with Tab



commit 4a7082bb0f3ec8f8cc4a200aa974aa20de379f8f
Author: Xavier Johnson <krinkodot22 hotmail com>
Date:   Tue May 29 00:52:24 2018 -0400

    switcherPopup: Cancel window cycling with Tab
    
    If the Escape key is used for a window/app cycler/switcher shortcut
    (such as "Switch windows directly"), then there is no way to cancel
    the switching/cycling operation with the keyboard.
    
    This change allows cancelling such an operation by pressing the Tab
    key, but only if Tab is not already being used by the current
    switcher/cycler shortcut.
    
    Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/315

 js/ui/switcherPopup.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/switcherPopup.js b/js/ui/switcherPopup.js
index a53b1e6e9..d645f1df9 100644
--- a/js/ui/switcherPopup.js
+++ b/js/ui/switcherPopup.js
@@ -192,7 +192,9 @@ var SwitcherPopup = new Lang.Class({
         if (this._keyPressHandler(keysym, action) != Clutter.EVENT_PROPAGATE)
             return Clutter.EVENT_STOP;
 
-        if (keysym == Clutter.Escape)
+        // Note: pressing one of the below keys will destroy the popup only if
+        // that key is not used by the active popup's keyboard shortcut
+        if (keysym == Clutter.Escape || keysym == Clutter.Tab)
             this.destroy();
 
         return Clutter.EVENT_STOP;


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