summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2012-05-03 18:58:12 +0200
committerBastien Nocera <hadess@hadess.net>2012-05-03 19:33:21 +0200
commit305632783e7b236323e6c3c713a3a86461795e86 (patch)
treefa2e4ce698ec48e1d28d3f7de1f8476e67fd747f
parent2420165dd170724aa0814ae0eb16b8c8dd699d8b (diff)
downloadclutter-305632783e7b236323e6c3c713a3a86461795e86.tar.gz
x11/device-manager-xi2: Fix assertions with touch
When getting touch events, the device manager would try to pass an invalid device to translate_axes(). clutter_event_set_device() will only update event->touch.device for touch events, not event->motion.device, as used. Fixes Totem crashing on mouse motion/button press when using a touchpad. https://bugzilla.gnome.org/show_bug.cgi?id=675371
-rw-r--r--clutter/x11/clutter-device-manager-xi2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/clutter/x11/clutter-device-manager-xi2.c b/clutter/x11/clutter-device-manager-xi2.c
index 5ac42c874..3356bd150 100644
--- a/clutter/x11/clutter-device-manager-xi2.c
+++ b/clutter/x11/clutter-device-manager-xi2.c
@@ -1044,7 +1044,7 @@ clutter_device_manager_xi2_translate_event (ClutterEventTranslator *translator,
GINT_TO_POINTER (xev->deviceid));
clutter_event_set_device (event, device);
- event->touch.axes = translate_axes (event->motion.device,
+ event->touch.axes = translate_axes (event->touch.device,
event->motion.x,
event->motion.y,
stage_x11,
@@ -1097,7 +1097,7 @@ clutter_device_manager_xi2_translate_event (ClutterEventTranslator *translator,
GINT_TO_POINTER (xev->deviceid));
clutter_event_set_device (event, device);
- event->touch.axes = translate_axes (event->motion.device,
+ event->touch.axes = translate_axes (event->touch.device,
event->motion.x,
event->motion.y,
stage_x11,