mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
backends/native: Dispose the libinput device in the input thread
Currently, the MetaInputDeviceNative owns the libinput_device, with the small catch that it is eventually finished in the main thread (as the CLUTTER_DEVICE_REMOVED event keeps the last reference to it). Make it sure that the libinput_device is destroyed in the input thread, before giving away the last extra input device references. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1639>
This commit is contained in:
@ -1592,3 +1592,9 @@ meta_input_device_native_get_coords_in_impl (MetaInputDeviceNative *device_nativ
|
||||
if (y)
|
||||
*y = device_native->pointer_y;
|
||||
}
|
||||
|
||||
void
|
||||
meta_input_device_native_detach_libinput_in_impl (MetaInputDeviceNative *device_native)
|
||||
{
|
||||
g_clear_pointer (&device_native->libinput_device, libinput_device_unref);
|
||||
}
|
||||
|
Reference in New Issue
Block a user