[gtk+] gdk: Make GDK_TOUCH_CANCEL be dealt with similarly to GDK_TOUCH_END
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gdk: Make GDK_TOUCH_CANCEL be dealt with similarly to GDK_TOUCH_END
- Date: Mon, 18 Apr 2016 13:18:06 +0000 (UTC)
commit 358d15ae5eabfa52b2dc3458e8ac59bec4d4e473
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Apr 17 21:19:58 2016 +0100
gdk: Make GDK_TOUCH_CANCEL be dealt with similarly to GDK_TOUCH_END
We must emit the cancel event with the same semantics, and towards the GdkWindow
that is currently under the touchpoint, so make proxy_button_event() deal with
GDK_TOUCH_CANCEL.
Fixes the GDK_TOUCH_CANCEL event being emitted only on the toplevel, which is
usually non-sufficient.
gdk/gdkwindow.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 725b712..5db80fa 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -7697,6 +7697,7 @@ is_button_type (GdkEventType type)
type == GDK_BUTTON_RELEASE ||
type == GDK_TOUCH_BEGIN ||
type == GDK_TOUCH_END ||
+ type == GDK_TOUCH_CANCEL ||
type == GDK_SCROLL;
}
@@ -9322,6 +9323,7 @@ proxy_button_event (GdkEvent *source_event,
case GDK_TOUCH_BEGIN:
case GDK_TOUCH_END:
+ case GDK_TOUCH_CANCEL:
convert_toplevel_coords_to_window (event_win,
toplevel_x, toplevel_y,
&event->button.x, &event->button.y);
@@ -9337,7 +9339,7 @@ proxy_button_event (GdkEvent *source_event,
gdk_event_set_source_device (event, source_device);
- if ((type == GDK_TOUCH_END &&
+ if (((type == GDK_TOUCH_END || type == GDK_TOUCH_CANCEL) &&
_gdk_event_get_pointer_emulated (source_event)) &&
pointer_window == pointer_info->window_under_pointer &&
gdk_device_get_source (source_device) == GDK_SOURCE_TOUCHSCREEN)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]