diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2020-12-16 19:14:54 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2020-12-16 19:14:54 +0100 |
commit | 446839c0d09b210b4ddaa657975d3f2da1391686 (patch) | |
tree | 84f0e87a25e044637e2b124e743d0315ef5182c4 | |
parent | b2b3d000d2d01ccae4413b079529442a3dcfc8bb (diff) | |
download | mutter-wip/carlosg/device-check.tar.gz |
backend/native: Check libinput_device in async callwip/carlosg/device-check
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>
-rw-r--r-- | src/backends/native/meta-input-settings-native.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backends/native/meta-input-settings-native.c b/src/backends/native/meta-input-settings-native.c index 3f9f71fe7..ba6ec6d26 100644 --- a/src/backends/native/meta-input-settings-native.c +++ b/src/backends/native/meta-input-settings-native.c @@ -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; } |