Blame SOURCES/osk-fixes.patch

9b660f
From 96ccb155bbe6ce570832a9f3d27a0a08698127ea Mon Sep 17 00:00:00 2001
9b660f
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
9b660f
Date: Sat, 28 Mar 2020 14:15:09 +0100
9b660f
Subject: [PATCH 1/3] keyboard: Don't include keyboard devices when updating
9b660f
 lastDevice
9b660f
9b660f
We're dealing with attached keyboards now using the touch_mode property
9b660f
of ClutterSeat: If a device has a keyboard attached, the touch-mode is
9b660f
FALSE and we won't automatically show the OSK on touches, also the
9b660f
touch-mode gets set to FALSE when an external keyboard is being plugged
9b660f
in, so that also hides the OSK automatically.
9b660f
9b660f
With that, we can now ignore keyboard devices when updating the last
9b660f
used device and no longer have to special-case our own virtual devices.
9b660f
9b660f
Because there was no special-case for the virtual device we use on
9b660f
Wayland now, this fixes a bug where the keyboard disappeared after
9b660f
touching keys like Enter or Backspace.
9b660f
9b660f
Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2287
9b660f
9b660f
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1142
9b660f
---
9b660f
 js/ui/keyboard.js | 3 +++
9b660f
 1 file changed, 3 insertions(+)
9b660f
9b660f
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
9b660f
index c4ac72d..94b5325 100644
9b660f
--- a/js/ui/keyboard.js
9b660f
+++ b/js/ui/keyboard.js
9b660f
@@ -1075,6 +1075,9 @@ var Keyboard = class Keyboard {
9b660f
                 let device = manager.get_device(deviceId);
9b660f
 
9b660f
                 if (device.get_device_name().indexOf('XTEST') < 0) {
9b660f
+                    if (device.device_type == Clutter.InputDeviceType.KEYBOARD_DEVICE)
9b660f
+                        return;
9b660f
+
9b660f
                     this._lastDeviceId = deviceId;
9b660f
                     this._syncEnabled();
9b660f
                 }
9b660f
-- 
9b660f
2.26.2
9b660f
9b660f
9b660f
From 3106746ae424287d8644643a2ef46d565e4cd7ed Mon Sep 17 00:00:00 2001
9b660f
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
9b660f
Date: Sat, 28 Mar 2020 14:34:24 +0100
9b660f
Subject: [PATCH 2/3] layout: Use translation_y of 0 to hide keyboard
9b660f
9b660f
Since we show the keyboard using a translation_y of -keyboardHeight, the
9b660f
keyboard will be moved down far enough to be out of sight by setting
9b660f
translation_y to 0.
9b660f
9b660f
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1142
9b660f
---
9b660f
 js/ui/layout.js | 6 +++---
9b660f
 1 file changed, 3 insertions(+), 3 deletions(-)
9b660f
9b660f
diff --git a/js/ui/layout.js b/js/ui/layout.js
9b660f
index beb4c0a..4382f6e 100644
9b660f
--- a/js/ui/layout.js
9b660f
+++ b/js/ui/layout.js
9b660f
@@ -719,7 +719,7 @@ var LayoutManager = GObject.registerClass({
9b660f
     showKeyboard() {
9b660f
         this.keyboardBox.show();
9b660f
         Tweener.addTween(this.keyboardBox,
9b660f
-                         { anchor_y: this.keyboardBox.height,
9b660f
+                         { translation_y: -this.keyboardBox.height,
9b660f
                            opacity: 255,
9b660f
                            time: KEYBOARD_ANIMATION_TIME,
9b660f
                            transition: 'easeOutQuad',
9b660f
@@ -735,7 +735,7 @@ var LayoutManager = GObject.registerClass({
9b660f
         this._updateRegions();
9b660f
 
9b660f
         this._keyboardHeightNotifyId = this.keyboardBox.connect('notify::height', () => {
9b660f
-            this.keyboardBox.anchor_y = this.keyboardBox.height;
9b660f
+            this.keyboardBox.translation_y = -this.keyboardBox.height;
9b660f
         });
9b660f
     }
9b660f
 
9b660f
@@ -745,7 +745,7 @@ var LayoutManager = GObject.registerClass({
9b660f
             this._keyboardHeightNotifyId = 0;
9b660f
         }
9b660f
         Tweener.addTween(this.keyboardBox,
9b660f
-                         { anchor_y: 0,
9b660f
+                         { translation_y: 0,
9b660f
                            opacity: 0,
9b660f
                            time: immediate ? 0 : KEYBOARD_ANIMATION_TIME,
9b660f
                            transition: 'easeInQuad',
9b660f
-- 
9b660f
2.26.2
9b660f
9b660f
9b660f
From 642822308a72be6a47f4eb285f32539499f0d3e4 Mon Sep 17 00:00:00 2001
9b660f
From: rpm-build <rpm-build>
9b660f
Date: Wed, 21 Oct 2020 20:29:34 +0200
9b660f
Subject: [PATCH 3/3] layout: queue redraw after hiding keyboard
9b660f
9b660f
---
9b660f
 js/ui/layout.js | 1 +
9b660f
 1 file changed, 1 insertion(+)
9b660f
9b660f
diff --git a/js/ui/layout.js b/js/ui/layout.js
9b660f
index 4382f6e..1824313 100644
9b660f
--- a/js/ui/layout.js
9b660f
+++ b/js/ui/layout.js
9b660f
@@ -759,6 +759,7 @@ var LayoutManager = GObject.registerClass({
9b660f
     _hideKeyboardComplete() {
9b660f
         this.keyboardBox.hide();
9b660f
         this._updateRegions();
9b660f
+        global.stage.queue_redraw();
9b660f
     }
9b660f
 
9b660f
     // setDummyCursorGeometry:
9b660f
-- 
9b660f
2.26.2
9b660f