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
This commit is contained in:
Carlos Garnacho 2016-10-14 14:15:32 +02:00
parent 68645df3a3
commit 2abee91dbc

View File

@ -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);
}