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
This commit is contained in:
parent
b5d21f00f8
commit
6c240dc83b
@ -1450,7 +1450,8 @@ meta_seat_native_handle_device_event (ClutterSeat *seat,
|
|||||||
switch (event->type)
|
switch (event->type)
|
||||||
{
|
{
|
||||||
case CLUTTER_DEVICE_ADDED:
|
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,
|
if (libinput_device_has_capability (device_native->libinput_device,
|
||||||
LIBINPUT_DEVICE_CAP_SWITCH) &&
|
LIBINPUT_DEVICE_CAP_SWITCH) &&
|
||||||
|
Loading…
Reference in New Issue
Block a user