[gtk+/touch-for-3.4-2: 33/44] gdk: Have touch grabs behave like the implicit grab wrt crossing events
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/touch-for-3.4-2: 33/44] gdk: Have touch grabs behave like the implicit grab wrt crossing events
- Date: Thu, 1 Mar 2012 20:28:57 +0000 (UTC)
commit 22c4b27fece0d2517a0494fa4bd2766f2dae3f2e
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Jan 5 00:51:32 2012 +0100
gdk: Have touch grabs behave like the implicit grab wrt crossing events
These are equivalent to an implicit grab (with !owner_events), so
if the touch leaves or enters the grab window, the other window
won't receive the corresponding counter-event.
gdk/gdkwindow.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 1f95ea7..5315ee4 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -8336,14 +8336,27 @@ send_crossing_event (GdkDisplay *display,
GdkEvent *event;
guint32 window_event_mask, type_event_mask;
GdkDeviceGrabInfo *grab;
+ GdkTouchGrabInfo *touch_grab = NULL;
GdkPointerWindowInfo *pointer_info;
gboolean block_event = FALSE;
+ GdkEventSequence *sequence;
grab = _gdk_display_has_device_grab (display, device, serial);
pointer_info = _gdk_display_get_pointer_info (display, device);
- if (grab != NULL &&
- !grab->owner_events)
+ sequence = gdk_event_get_event_sequence (event_in_queue);
+ if (sequence)
+ touch_grab = _gdk_display_has_touch_grab (display, device, sequence, serial);
+
+ if (touch_grab)
+ {
+ if (window != touch_grab->window)
+ return;
+
+ window_event_mask = touch_grab->event_mask;
+ }
+ else if (grab != NULL &&
+ !grab->owner_events)
{
/* !owner_event => only report events wrt grab window, ignore rest */
if ((GdkWindow *)window != grab->window)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]