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