mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 20:32:16 +00:00
backend: Don't emit last-device updates with no device
When removing a device that has been just marked as the last in use, we may try to notify that a NULL device is the last one. This is not supported, as both update_last_device() and the clients of the "::last-device-changed" signal are assuming that the last device is always a valid ClutterInputDevice. So let's avoid erroring, and stop the idle when clearing the current device. Related to: https://gitlab.gnome.org/GNOME/mutter/-/issues/1345 https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1371
This commit is contained in:
parent
285f2a2124
commit
0756826753
@ -438,6 +438,7 @@ on_device_removed (ClutterSeat *seat,
|
||||
ClutterInputDeviceType device_type;
|
||||
|
||||
priv->current_device = NULL;
|
||||
g_clear_handle_id (&priv->device_update_idle_id, g_source_remove);
|
||||
|
||||
device_type = clutter_input_device_get_device_type (device);
|
||||
has_touchscreen = check_has_slave_touchscreen (seat);
|
||||
|
Loading…
Reference in New Issue
Block a user