[gnome-shell/wip/rstrode/login-screen-extensions: 123/134] keyboard: Don't include keyboard devices when updating lastDevice
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/rstrode/login-screen-extensions: 123/134] keyboard: Don't include keyboard devices when updating lastDevice
- Date: Thu, 26 Aug 2021 19:31:02 +0000 (UTC)
commit 547721ee9b1a3722c9c2ec6b534ac8131c19758c
Author: Jonas Dreßler <verdre v0yd nl>
Date: Sat Mar 28 14:15:09 2020 +0100
keyboard: Don't include keyboard devices when updating lastDevice
We're dealing with attached keyboards now using the touch_mode property
of ClutterSeat: If a device has a keyboard attached, the touch-mode is
FALSE and we won't automatically show the OSK on touches, also the
touch-mode gets set to FALSE when an external keyboard is being plugged
in, so that also hides the OSK automatically.
With that, we can now ignore keyboard devices when updating the last
used device and no longer have to special-case our own virtual devices.
Because there was no special-case for the virtual device we use on
Wayland now, this fixes a bug where the keyboard disappeared after
touching keys like Enter or Backspace.
Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2287
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1142
js/ui/keyboard.js | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index c4ac72d1d9..94b53250b2 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -1075,6 +1075,9 @@ var Keyboard = class Keyboard {
let device = manager.get_device(deviceId);
if (device.get_device_name().indexOf('XTEST') < 0) {
+ if (device.device_type == Clutter.InputDeviceType.KEYBOARD_DEVICE)
+ return;
+
this._lastDeviceId = deviceId;
this._syncEnabled();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]