diff options
author | Hans de Goede <hdegoede@redhat.com> | 2020-10-14 21:17:13 +0200 |
---|---|---|
committer | Olivier Fourdan <ofourdan@redhat.com> | 2020-11-27 17:18:36 +0100 |
commit | 48d4153c06979db1b21e82dc34d801c32ac80b9a (patch) | |
tree | d581be843b6a528d63af11a4c776ab25ca950c7b /src/backends/native/meta-seat-native.c | |
parent | 4bb5ff39ae046c8aa578fa90016b7ad7f913df9d (diff) | |
download | mutter-48d4153c06979db1b21e82dc34d801c32ac80b9a.tar.gz |
seat-native: Fix has_touchscreen becoming FALSE when a non touchscreen device gets added
Unconditionally setting has_touchscreen to check_touch_mode
when a new device gets added leads to has_touchscreen becoming
false when during runtime e.g. an USB keyboard gets plugged in.
Fix this by setting has_touchscreen to TRUE when check_touch_mode
is TRUE and leaving it alone otherwise.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1506
(cherry picked from commit 6c240dc83b33d26696825c6ee70560e201542fd7)
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1610>
Diffstat (limited to 'src/backends/native/meta-seat-native.c')
-rw-r--r-- | src/backends/native/meta-seat-native.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backends/native/meta-seat-native.c b/src/backends/native/meta-seat-native.c index 5fb0e8e52..5c6280576 100644 --- a/src/backends/native/meta-seat-native.c +++ b/src/backends/native/meta-seat-native.c @@ -1450,7 +1450,8 @@ meta_seat_native_handle_device_event (ClutterSeat *seat, switch (event->type) { case CLUTTER_DEVICE_ADDED: - seat_native->has_touchscreen = check_touch_mode; + if (check_touch_mode) + seat_native->has_touchscreen = TRUE; if (libinput_device_has_capability (device_native->libinput_device, LIBINPUT_DEVICE_CAP_SWITCH) && |