[gnome-shell] [appSwitcher] Check the modifier state rather than assuming Meta



commit 907dd4381b7252646be3cac026fd794ca8b58768
Author: Adel Gadllah <adel gadllah gmail com>
Date:   Sat Sep 11 22:41:59 2010 +0200

    [appSwitcher] Check the modifier state rather than assuming Meta
    
    It isn't guaranteed that Alt+Shift equals to Meta, so we have to check
    the modifier instead.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=629368

 js/ui/altTab.js |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/altTab.js b/js/ui/altTab.js
index 6417395..6a4ba0c 100644
--- a/js/ui/altTab.js
+++ b/js/ui/altTab.js
@@ -264,9 +264,10 @@ AltTabPopup.prototype = {
     },
 
     _keyReleaseEvent : function(actor, event) {
-        let keysym = event.get_key_symbol();
+        let [x, y, mods] = global.get_pointer();
+        let state = mods & Clutter.ModifierType.MOD1_MASK;
 
-        if (keysym == Clutter.Alt_L || keysym == Clutter.Alt_R || keysym == Clutter.Meta_L || keysym == Clutter.Meta_R)
+        if (state == 0)
             this._finish();
 
         return true;



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