diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2011-12-29 00:06:45 +0100 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2012-03-01 16:25:25 -0500 |
commit | c72a77b04c76b8f28e7680f4acd7a3ca7ec9845c (patch) | |
tree | 25d1e00499ca917cf8ef4159de63e4c2d302df2e /gdk/gdkdisplay.c | |
parent | b5cfdf2db4c4e1bd92d18943fa7471c4fbd85bd3 (diff) | |
download | gtk+-c72a77b04c76b8f28e7680f4acd7a3ca7ec9845c.tar.gz |
gdk: handle implicit touch grabs
If the touch sequence happens on a window with GDK_TOUCH_MASK set,
a GdkTouchGrabInfo is created to back it up. Else a device grab is
only created if the sequence emulates the pointer.
If both a device and a touch grab are present on a window, the later
of them both is obeyed, Any grab on the device happening after a
touch grab generates grab-broken on all the windows an implicit
touch grab was going on.
Diffstat (limited to 'gdk/gdkdisplay.c')
-rw-r--r-- | gdk/gdkdisplay.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c index 5684247ca0..b62b81069d 100644 --- a/gdk/gdkdisplay.c +++ b/gdk/gdkdisplay.c @@ -1049,12 +1049,15 @@ _gdk_display_device_grab_update (GdkDisplay *display, next_grab = NULL; /* Actually its not yet active */ } + if (next_grab) + _gdk_display_break_touch_grabs (display, device, next_grab->window); + if ((next_grab == NULL && current_grab->implicit_ungrab) || - (next_grab != NULL && current_grab->window != next_grab->window)) - generate_grab_broken_event (GDK_WINDOW (current_grab->window), + (next_grab != NULL && current_grab->window != next_grab->window)) + generate_grab_broken_event (GDK_WINDOW (current_grab->window), device, - current_grab->implicit, - next_grab? next_grab->window : NULL); + current_grab->implicit, + next_grab? next_grab->window : NULL); /* Remove old grab */ grabs = g_list_delete_link (grabs, grabs); |