gtk-demo: Handle GDK_TOUCH_CANCEL in event-axes demo

It is a thing in wayland, which means we leave traces from older
touches when the compositor takes over touch sequences in order
to handle a gesture.
This commit is contained in:
Carlos Garnacho 2016-03-14 15:28:20 +01:00
parent c5a8be8fc6
commit 6fd05dfe53

View File

@ -131,7 +131,8 @@ update_axes_from_event (GdkEvent *event,
source_device = gdk_event_get_source_device (event);
sequence = gdk_event_get_event_sequence (event);
if (event->type == GDK_TOUCH_END)
if (event->type == GDK_TOUCH_END ||
event->type == GDK_TOUCH_CANCEL)
{
g_hash_table_remove (data->touch_info, sequence);
return;