Commit 52cdbc12 authored by Peter Hutterer's avatar Peter Hutterer

evdev: fix axis mixup for the wheel click angles

vertical wheel is y, not x
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit eb048529)
parent fc78e888
......@@ -970,7 +970,7 @@ fallback_process_relative(struct fallback_dispatch *dispatch,
case REL_WHEEL:
fallback_flush_pending_event(dispatch, device, time);
wheel_degrees.y = -1 * e->value *
device->scroll.wheel_click_angle.x;
device->scroll.wheel_click_angle.y;
discrete.y = -1 * e->value;
source = device->scroll.is_tilt.vertical ?
......@@ -988,7 +988,7 @@ fallback_process_relative(struct fallback_dispatch *dispatch,
case REL_HWHEEL:
fallback_flush_pending_event(dispatch, device, time);
wheel_degrees.x = e->value *
device->scroll.wheel_click_angle.y;
device->scroll.wheel_click_angle.x;
discrete.x = e->value;
source = device->scroll.is_tilt.horizontal ?
......
......@@ -1099,17 +1099,17 @@ evdev_read_wheel_click_props(struct evdev_device *device)
/* CLICK_COUNT overrides CLICK_ANGLE */
if (!evdev_read_wheel_click_count_prop(device,
"MOUSE_WHEEL_CLICK_COUNT",
&angles.x))
&angles.y))
evdev_read_wheel_click_prop(device,
"MOUSE_WHEEL_CLICK_ANGLE",
&angles.x);
&angles.y);
if (!evdev_read_wheel_click_count_prop(device,
"MOUSE_WHEEL_CLICK_COUNT_HORIZONTAL",
&angles.y)) {
&angles.x)) {
if (!evdev_read_wheel_click_prop(device,
"MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL",
&angles.y))
angles.y = angles.x;
&angles.x))
angles.x = angles.y;
}
return angles;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment