x11: Reset scroll valuators

We need to clear up the state on enter and leave, as well as when the X
server tells us that the device has changed.
This commit is contained in:
Emmanuele Bassi 2012-03-19 14:27:54 +00:00
parent 676a317439
commit 1c500f7de9

View File

@ -672,6 +672,7 @@ clutter_device_manager_xi2_translate_event (ClutterEventTranslator *translator,
device = g_hash_table_lookup (manager_xi2->devices_by_id,
GINT_TO_POINTER (xev->deviceid));
_clutter_input_device_reset_axes (device);
_clutter_input_device_reset_scroll_info (device);
translate_device_classes (backend_x11->xdpy,
device,
xev->classes,
@ -990,6 +991,8 @@ clutter_device_manager_xi2_translate_event (ClutterEventTranslator *translator,
_clutter_stage_remove_device (stage, device);
}
_clutter_input_device_reset_scroll_info (source_device);
clutter_event_set_device (event, device);
clutter_event_set_source_device (event, source_device);