[gnome-shell] windowManager: Replace sessionMode.allowKeybindingsWhenModal



commit 28b559e812cee6463328f4f8ec09826a3d5b0b67
Author: Florian MÃllner <fmuellner gnome org>
Date:   Mon Aug 20 16:20:23 2012 +0200

    windowManager: Replace sessionMode.allowKeybindingsWhenModal
    
    The original condition the property was based on was added to make
    the a11y switcher available in the login screen, though it did never
    work properly - after popping up the switcher, additional tab key
    presses were ignored. As we are now able to filter bindings much more
    selectively, we can simplify the check and drop the sessionMode property.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=688202

 js/ui/sessionMode.js   |    2 --
 js/ui/windowManager.js |    6 ++----
 2 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/sessionMode.js b/js/ui/sessionMode.js
index feca51e..47b1bbf 100644
--- a/js/ui/sessionMode.js
+++ b/js/ui/sessionMode.js
@@ -14,7 +14,6 @@ const _modes = {
         showCalendarEvents: false,
         allowSettings: false,
         allowExtensions: false,
-        allowKeybindingsWhenModal: false,
         hasRunDialog: false,
         hasWorkspaces: false,
         hasWindows: false,
@@ -32,7 +31,6 @@ const _modes = {
     },
 
     'gdm': {
-        allowKeybindingsWhenModal: true,
         hasNotifications: true,
         isGreeter: true,
         isPrimary: true,
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
index 4e3467d..c4896ee 100644
--- a/js/ui/windowManager.js
+++ b/js/ui/windowManager.js
@@ -474,10 +474,8 @@ const WindowManager = new Lang.Class({
     },
 
     _filterKeybinding: function(shellwm, binding) {
-        if (!Main.sessionMode.allowKeybindingsWhenModal) {
-            if (Main.modalCount > (Main.overview.visible ? 1 : 0))
-                return true;
-        }
+        if (Main.keybindingMode == Main.KeybindingMode.NONE)
+            return true;
 
         // There's little sense in implementing a keybinding in mutter and
         // not having it work in NORMAL mode; handle this case generically



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