[gnome-shell] viewSelector: Ignore key-presses during non-overview modals



commit 2a5eed1eb4a039f938477bfb3890f145f88eccdf
Author: Florian MÃllner <fmuellner gnome org>
Date:   Mon Nov 12 18:41:14 2012 +0100

    viewSelector: Ignore key-presses during non-overview modals
    
    Since commit 0c807bddaf4d, the run dialog no longer handles Escape
    key presses itself but uses the action key mechanism of modal dialogs.
    As the latter uses key-release events, our own handling of the Escape
    key runs on key-press.
    Fix this by bailing out early if anything has pushed a modal in addition
    to the overview (like system modals, looking glass, ...).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=688196

 js/ui/viewSelector.js |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index 9c73e8e..060c885 100644
--- a/js/ui/viewSelector.js
+++ b/js/ui/viewSelector.js
@@ -249,6 +249,11 @@ const ViewSelector = new Lang.Class({
     },
 
     _onStageKeyPress: function(actor, event) {
+        // Ignore events while anything but the overview has
+        // pushed a modal (system modals, looking glass, ...)
+        if (Main.modalCount > 1)
+            return false;
+
         let modifiers = event.get_state();
         let symbol = event.get_key_symbol();
 



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