[gnome-shell/wip/carlosg/osk-cldr: 10/34] keyboard: Prevent keyboard from showing anytime it's enabled



commit fc3ee0a224af03defe7e315201eb9031ec50ec0d
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Oct 10 20:26:14 2017 +0200

    keyboard: Prevent keyboard from showing anytime it's enabled
    
    Create the keyboard layout early on (it will be recreated if needed on
    keymaps being added/removed) and wait for a11y focus notifications in
    order to really show the keyboard.
    
    Fixes it being shown anytime it's enabled (eg. when touching anywhere
    on the touchscreen).

 js/ui/keyboard.js |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index da36c36..54b889b 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -202,6 +202,8 @@ var Keyboard = new Lang.Class({
 
         Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._redraw));
         this._redraw();
+
+        this._setupKeyboard();
     },
 
     _setCaretTrackerEnabled: function (enabled) {
@@ -312,12 +314,10 @@ var Keyboard = new Lang.Class({
 
         this._setCaretTrackerEnabled(this._enableKeyboard);
 
-        if (this._enableKeyboard) {
-            if (!this._keyboard)
-                this._setupKeyboard();
-            else
-                Main.layoutManager.showKeyboard();
-        } else {
+        if (this._enableKeyboard && !this._keyboard) {
+            // Don't show it here, we wait for the caret tracker to tell us so.
+            this._setupKeyboard();
+        } else if (!this._enableKeyboard) {
             Main.layoutManager.hideKeyboard(true);
         }
     },


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