[gnome-shell/wip/carlosg/osk-x11-activation: 2/2] keyboard: Always enable OSK on X11



commit 459d0cff5048e2f64d579b562c4bfc808055262e
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Sep 17 21:05:55 2018 +0200

    keyboard: Always enable OSK on X11
    
    There is no input panel state requests available on X11, so ensure the
    OSK will be shown on focus (position) changes there. This restores
    (in a more insisting way maybe) the behavior prior to commit fc5ab44704
    on X11.

 js/ui/keyboard.js | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index 2e300cd3d..78dc32e83 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -622,6 +622,12 @@ var Keyboard = new Lang.Class({
     _onFocusPositionChanged(focusTracker) {
         let rect = focusTracker.getCurrentRect();
         this.setCursorLocation(focusTracker.currentWindow, rect.x, rect.y, rect.width, rect.height);
+
+        if (!Meta.is_wayland_compositor()) {
+            // On X11 there's no panel state, assume the keyboard should always
+            // be turned on given the right activation circumstances.
+            this.show(Main.layoutManager.focusIndex);
+        }
     },
 
     _lastDeviceIsTouchscreen() {


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