[gnome-shell-extensions/gnome-3-2] windowsNavigator: allows input from the keypad



commit f440101f96ce1b191a59eb0268ce44e3a9a69ce2
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Mon Feb 6 16:42:34 2012 +0100

    windowsNavigator: allows input from the keypad
    
    Based on a patch by Simon Friis Vindum <simonfv mail com>

 extensions/windowsNavigator/extension.js |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/extensions/windowsNavigator/extension.js b/extensions/windowsNavigator/extension.js
index 3191d7c..58c1312 100644
--- a/extensions/windowsNavigator/extension.js
+++ b/extensions/windowsNavigator/extension.js
@@ -175,10 +175,14 @@ function enable() {
                 return false;
             }
 
-            let c = o.get_key_symbol() - Clutter.KEY_0;
+            let c = o.get_key_symbol() - Clutter.KEY_KP_0;
             if (c > 9 || c <= 0) {
-                this._hideTooltips();
-                return false;
+                c = o.get_key_symbol() - Clutter.KEY_0;
+                if (c > 9 || c <= 0) {
+                    this._hideTooltips();
+                    global.log(c);
+                    return false;
+                }
             }
 
             let win = this._workspaces[this._active].getWindowWithTooltip(c);
@@ -190,10 +194,13 @@ function enable() {
             return true;
         }
         if (this._pickWorkspace) {
-            let c = o.get_key_symbol() - Clutter.KEY_0;
+            let c = o.get_key_symbol() - Clutter.KEY_KP_0;
             if (c > 9 || c <= 0) {
-                this._hideWorkspacesTooltips();
-                return false;
+                c = o.get_key_symbol() - Clutter.KEY_0;
+                if (c > 9 || c <= 0) {
+                    this._hideWorkspacesTooltips();
+                    return false;
+                }
             }
 
             let workspace = this._workspaces[c - 1];



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