backend/native: Check libinput_device in async call

Power saving changes in laptop panels enable/disable the attached
touchscreen input device, this is an asynchronous operation that
may be happening while the device is disappearing.

In fact, closing the lid is such perfect storm where both things
happen around the same time.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1644>
This commit is contained in:
Carlos Garnacho 2020-12-16 19:14:54 +01:00
parent b2b3d000d2
commit 446839c0d0

View File

@ -108,6 +108,7 @@ set_send_events (GTask *task)
}
libinput_device = meta_input_device_native_get_libinput_device (device);
if (libinput_device)
libinput_device_config_send_events_set_mode (libinput_device, libinput_mode);
return G_SOURCE_REMOVE;