[gtk+/multitouch: 102/123] gtk: rewrite touch events wrt the window group too



commit 373711468ba0058add4ddf31cbe95ea3905fc3e7
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Dec 29 00:22:02 2011 +0100

    gtk: rewrite touch events wrt the window group too
    
    Likewise to pointer events, have touch events during a device
    grab with owner_events=TRUE be delivered normally as long as
    the widget pertains to the same window group.

 gtk/gtkmain.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 5becfc2..67639cd 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -1334,11 +1334,14 @@ rewrite_event_for_window (GdkEvent  *event,
     case GDK_2BUTTON_PRESS:
     case GDK_3BUTTON_PRESS:
     case GDK_BUTTON_RELEASE:
+    case GDK_TOUCH_PRESS:
+    case GDK_TOUCH_RELEASE:
       rewrite_events_translate (event->any.window,
                                 new_window,
                                 &event->button.x, &event->button.y);
       break;
     case GDK_MOTION_NOTIFY:
+    case GDK_TOUCH_MOTION:
       rewrite_events_translate (event->any.window,
                                 new_window,
                                 &event->motion.x, &event->motion.y);
@@ -1388,6 +1391,9 @@ rewrite_event_for_grabs (GdkEvent *event)
     case GDK_PROXIMITY_OUT:
     case GDK_KEY_PRESS:
     case GDK_KEY_RELEASE:
+    case GDK_TOUCH_PRESS:
+    case GDK_TOUCH_RELEASE:
+    case GDK_TOUCH_MOTION:
       display = gdk_window_get_display (event->any.window);
       device = gdk_event_get_device (event);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]