From 2abee91dbcd68870791337dfd1c7c96636fb805f Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Fri, 14 Oct 2016 14:15:32 +0200 Subject: [PATCH] wayland: Cancel touches on meta_wayland_touch_disable() When disabling the device/capability, we can't rely on cancelled events being emitted timely, because the capability will be already disabled by then, all touches must be cancelled immediately then. https://bugzilla.gnome.org/show_bug.cgi?id=772929 --- src/wayland/meta-wayland-touch.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wayland/meta-wayland-touch.c b/src/wayland/meta-wayland-touch.c index 221ba9b77..6593d7c87 100644 --- a/src/wayland/meta-wayland-touch.c +++ b/src/wayland/meta-wayland-touch.c @@ -541,6 +541,8 @@ meta_wayland_touch_disable (MetaWaylandTouch *touch) clutter_evdev_remove_filter (evdev_filter_func, touch); #endif + meta_wayland_touch_cancel (touch); + g_clear_pointer (&touch->touch_surfaces, (GDestroyNotify) g_hash_table_unref); g_clear_pointer (&touch->touches, (GDestroyNotify) g_hash_table_unref); }