[gtk+/multitouch-for-3.4: 65/89] gdk, xi2: set pointer emulated flags on events with XIPointerEmulated



commit fc38d348ba5975f763bfc7337d08228e455f9890
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Dec 28 01:41:43 2011 +0100

    gdk,xi2: set pointer emulated flags on events with XIPointerEmulated

 gdk/x11/gdkdevicemanager-xi2.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
index 2efc39c..e4d754a 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -29,6 +29,7 @@
 #include "gdkprivate-x11.h"
 #include "gdkintl.h"
 #include "gdkkeysyms.h"
+#include "gdkinternals.h"
 
 #ifdef XINPUT_2
 
@@ -1205,6 +1206,9 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
               event->button.button = xev->detail;
           }
 
+        if (xev->flags & XIPointerEmulated)
+          _gdk_event_set_pointer_emulated (event, TRUE);
+
         if (return_val == FALSE)
           break;
 
@@ -1260,6 +1264,9 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
 	if (ev->evtype == XI_TouchUpdate)
           event->motion.state |= GDK_BUTTON1_MASK;
 
+        if (xev->flags & XIPointerEmulated)
+          _gdk_event_set_pointer_emulated (event, TRUE);
+
         /* There doesn't seem to be motion hints in XI */
         event->motion.is_hint = FALSE;
 



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