[gtk+/xi2: 1239/1239] GdkDeviceManagerXI: Actually translate axes in button/motion events.



commit e9f27bd0f1a5056ccc551c77c15b285d84f4232d
Author: Carlos Garnacho <carlos gnome org>
Date:   Tue Sep 29 12:13:46 2009 +0200

    GdkDeviceManagerXI: Actually translate axes in button/motion events.

 gdk/x11/gdkdevicemanager-xi.c |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/gdk/x11/gdkdevicemanager-xi.c b/gdk/x11/gdkdevicemanager-xi.c
index 9454c40..8c05d91 100644
--- a/gdk/x11/gdkdevicemanager-xi.c
+++ b/gdk/x11/gdkdevicemanager-xi.c
@@ -453,11 +453,10 @@ gdk_device_manager_xi_translate_event (GdkEventTranslator *translator,
       event->button.x_root = (gdouble) xdbe->x_root;
       event->button.y_root = (gdouble) xdbe->y_root;
 
-      event->button.axes = g_new (gdouble, device->num_axes);
-      translate_axes (device, window,
-                      event->button.x,
-                      event->button.y,
-                      xdbe->axis_data);
+      event->button.axes = translate_axes (device, window,
+                                           event->button.x,
+                                           event->button.y,
+                                           xdbe->axis_data);
 
       event->button.state = translate_state (xdbe->state, xdbe->device_state);
       event->button.button = xdbe->button;
@@ -564,11 +563,10 @@ gdk_device_manager_xi_translate_event (GdkEventTranslator *translator,
       event->motion.x_root = (gdouble) xdme->x_root;
       event->motion.y_root = (gdouble) xdme->y_root;
 
-      event->motion.axes = g_new (gdouble, device->num_axes);
-      translate_axes (device, window,
-                      event->motion.x,
-                      event->motion.y,
-                      xdme->axis_data);
+      event->motion.axes = translate_axes (device, window,
+                                           event->motion.x,
+                                           event->motion.y,
+                                           xdme->axis_data);
 
       event->motion.type = GDK_MOTION_NOTIFY;
       event->motion.window = g_object_ref (window);



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