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:
parent
c5a8be8fc6
commit
6fd05dfe53
@ -131,7 +131,8 @@ update_axes_from_event (GdkEvent *event,
|
|||||||
source_device = gdk_event_get_source_device (event);
|
source_device = gdk_event_get_source_device (event);
|
||||||
sequence = gdk_event_get_event_sequence (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);
|
g_hash_table_remove (data->touch_info, sequence);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user