[gtk+] gtk-demo: Handle GDK_TOUCH_CANCEL in event-axes demo
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtk-demo: Handle GDK_TOUCH_CANCEL in event-axes demo
- Date: Mon, 14 Mar 2016 14:30:58 +0000 (UTC)
commit 6fd05dfe53ae68a3730a0dc3461bb044de4a1ca3
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Mar 14 15:28:20 2016 +0100
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.
demos/gtk-demo/event_axes.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/demos/gtk-demo/event_axes.c b/demos/gtk-demo/event_axes.c
index bc31f53..bfec8b7 100644
--- a/demos/gtk-demo/event_axes.c
+++ b/demos/gtk-demo/event_axes.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]