[gtk+/multitouch-for-3.4: 85/89] gdk: let implicit touch grabs coexist with the implicit pointer grab
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/multitouch-for-3.4: 85/89] gdk: let implicit touch grabs coexist with the implicit pointer grab
- Date: Thu, 23 Feb 2012 12:33:04 +0000 (UTC)
commit 100125bf9e598210859f7abc295b98820238dcc5
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Feb 21 03:27:51 2012 +0100
gdk: let implicit touch grabs coexist with the 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 0b66d8a..1051423 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -9475,6 +9475,7 @@ proxy_button_event (GdkEvent *source_event,
GdkWindow *parent;
GdkEvent *event;
GdkPointerWindowInfo *pointer_info;
+ GdkDeviceGrabInfo *pointer_grab;
guint state;
guint32 time_;
GdkEventType type;
@@ -9501,11 +9502,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]