mirror of
https://github.com/brl/mutter.git
synced 2025-01-23 18:09:10 +00:00
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
This commit is contained in:
parent
217ff7c8fb
commit
2bb84d9169
@ -1045,7 +1045,7 @@ clutter_device_manager_xi2_translate_event (ClutterEventTranslator *translator,
|
|||||||
GINT_TO_POINTER (xev->deviceid));
|
GINT_TO_POINTER (xev->deviceid));
|
||||||
clutter_event_set_device (event, device);
|
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.x,
|
||||||
event->motion.y,
|
event->motion.y,
|
||||||
stage_x11,
|
stage_x11,
|
||||||
@ -1098,7 +1098,7 @@ clutter_device_manager_xi2_translate_event (ClutterEventTranslator *translator,
|
|||||||
GINT_TO_POINTER (xev->deviceid));
|
GINT_TO_POINTER (xev->deviceid));
|
||||||
clutter_event_set_device (event, device);
|
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.x,
|
||||||
event->motion.y,
|
event->motion.y,
|
||||||
stage_x11,
|
stage_x11,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user