From 1c500f7de9d02c826e333e7dfd90aa8bb677d484 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 19 Mar 2012 14:27:54 +0000 Subject: [PATCH] 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. --- clutter/x11/clutter-device-manager-xi2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clutter/x11/clutter-device-manager-xi2.c b/clutter/x11/clutter-device-manager-xi2.c index bdbe5364b..da669bb1b 100644 --- a/clutter/x11/clutter-device-manager-xi2.c +++ b/clutter/x11/clutter-device-manager-xi2.c @@ -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);