[mutter/gnome-3-36] backend: Don't emit last-device updates with no device
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-3-36] backend: Don't emit last-device updates with no device
- Date: Sat, 19 Sep 2020 14:56:22 +0000 (UTC)
commit e559e21cf8019c108ea0830c394792b5d5df0cb7
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Wed Jul 15 00:49:08 2020 +0200
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
(cherry picked from commit 0756826753acf058bc7408fc0feecffd365b10ee)
src/backends/meta-backend.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/src/backends/meta-backend.c b/src/backends/meta-backend.c
index f75df806bc..a08d811426 100644
--- a/src/backends/meta-backend.c
+++ b/src/backends/meta-backend.c
@@ -445,6 +445,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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]