[gnome-shell] keyboard: Ignore focus changes from extended keys



commit ef9f63fe594990119df6a8a0c8ccfd3304c220eb
Author: Florian MÃllner <fmuellner gnome org>
Date:   Mon Sep 24 20:03:53 2012 +0200

    keyboard: Ignore focus changes from extended keys
    
    The keyboard is shown/hidden automatically when (un)focusing a
    ClutterText actor. This behavior is unwanted when opening the
    extended keys popup, so focus changes to the popup are ignored.
    However, we also want to ignore focus changes from the popup
    to avoid the keyboard hiding itself after pressing an extended
    key.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=683546

 js/ui/keyboard.js |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index f01fdff..2389ba5 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -201,6 +201,7 @@ const Keyboard = new Lang.Class({
 
         this.actor = null;
         this._focusInTray = false;
+        this._focusInExtendedKeys = false;
 
         this._timestamp = global.display.get_current_time_roundtrip();
         Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._redraw));
@@ -289,7 +290,9 @@ const Keyboard = new Lang.Class({
 
         // Showing an extended key popup and clicking a key from the extended keys
         // will grab focus, but ignore that
-        if (focus && (focus._extended_keys || focus.extended_key))
+        let extendedKeysWereFocused = this._focusInExtendedKeys;
+        this._focusInExtendedKeys = focus && (focus._extended_keys || focus.extended_key);
+        if (this._focusInExtendedKeys || extendedKeysWereFocused)
             return;
 
         // Ignore focus changes caused by message tray showing/hiding



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