[gtk+/xi2: 1233/1239] GdkDeviceManagerXI: Translate x_root/y_root in motion/button events.
- From: Carlos Garnacho <carlosg src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+/xi2: 1233/1239] GdkDeviceManagerXI: Translate x_root/y_root in motion/button events.
- Date: Tue, 29 Sep 2009 11:00:10 +0000 (UTC)
commit 77d62b5f80578f728be86210956c0052f59b4f30
Author: Carlos Garnacho <carlos gnome org>
Date: Mon Sep 28 00:18:14 2009 +0200
GdkDeviceManagerXI: Translate x_root/y_root in motion/button events.
gdk/x11/gdkdevicemanager-xi.c | 18 +++++++-----------
1 files changed, 7 insertions(+), 11 deletions(-)
---
diff --git a/gdk/x11/gdkdevicemanager-xi.c b/gdk/x11/gdkdevicemanager-xi.c
index 7883526..4917265 100644
--- a/gdk/x11/gdkdevicemanager-xi.c
+++ b/gdk/x11/gdkdevicemanager-xi.c
@@ -414,18 +414,17 @@ gdk_device_manager_xi_translate_event (GdkEventTranslator *translator,
event->button.window = g_object_ref (window);
event->button.time = xdbe->time;
- event->button.axes = g_new (gdouble, device->num_axes);
event->button.x = (gdouble) xdbe->x;
event->button.y = (gdouble) xdbe->y;
+ 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);
-#if 0
- event->button.x_root = event->button.x + priv->abs_x + input_window->root_x;
- event->button.y_root = event->button.y + priv->abs_y + input_window->root_y;
-#endif
+
event->button.state = translate_state (xdbe->state, xdbe->device_state);
event->button.button = xdbe->button;
@@ -526,19 +525,16 @@ gdk_device_manager_xi_translate_event (GdkEventTranslator *translator,
event->motion.device = device;
- event->motion.axes = g_new (gdouble, device->num_axes);
-
event->motion.x = (gdouble) xdme->x;
event->motion.y = (gdouble) xdme->y;
+ 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);
-#if 0
- event->motion.x_root = event->motion.x + priv->abs_x + input_window->root_x;
- event->motion.y_root = event->motion.y + priv->abs_y + input_window->root_y;
-#endif
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]