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:
parent
b2b3d000d2
commit
446839c0d0
1 changed files with 2 additions and 1 deletions
|
@ -108,7 +108,8 @@ set_send_events (GTask *task)
|
|||
}
|
||||
|
||||
libinput_device = meta_input_device_native_get_libinput_device (device);
|
||||
libinput_device_config_send_events_set_mode (libinput_device, libinput_mode);
|
||||
if (libinput_device)
|
||||
libinput_device_config_send_events_set_mode (libinput_device, libinput_mode);
|
||||
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue