[gtk+/touch-for-3.4: 53/65] gdk: Let implicit touch grabs coexist with an implicit pointer grab
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/touch-for-3.4: 53/65] gdk: Let implicit touch grabs coexist with an implicit pointer grab
- Date: Fri, 24 Feb 2012 15:29:17 +0000 (UTC)
commit b04f2cfb1c65e4400cbb614bbdb6d68550f89152
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Feb 21 03:27:51 2012 +0100
gdk: Let implicit touch grabs coexist with an implicit pointer grab
Create the backing GdkTouchGrabInfo for touches even if the pointer
emulating touch sequence is already holding an implicit grab on a
window that didn't select for touch events.
gdk/gdkwindow.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 577759f..8bb9ee7 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -9476,6 +9476,7 @@ proxy_button_event (GdkEvent *source_event,
GdkWindow *parent;
GdkEvent *event;
GdkPointerWindowInfo *pointer_info;
+ GdkDeviceGrabInfo *pointer_grab;
guint state;
guint32 time_;
GdkEventType type;
@@ -9502,11 +9503,14 @@ proxy_button_event (GdkEvent *source_event,
touch_id = 0;
pointer_info = _gdk_display_get_pointer_info (display, device);
+ pointer_grab = _gdk_display_has_device_grab (display, device, serial);
if ((type == GDK_BUTTON_PRESS ||
type == GDK_TOUCH_PRESS) &&
!source_event->any.send_event &&
- _gdk_display_has_device_grab (display, device, serial) == NULL)
+ (!pointer_grab ||
+ (type == GDK_TOUCH_PRESS && pointer_grab->implicit &&
+ !_gdk_event_get_pointer_emulated (source_event))))
{
pointer_window =
_gdk_window_find_descendant_at (toplevel_window,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]