evdev: v120 scroll: invert horizontal scrolling quirk

When required, invert horizontal scrolling in evdev_notify_axis_wheel
following the QUIRK_MODEL_INVERT_HORIZONTAL_SCROLLING quirk.

Fix #669

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
This commit is contained in:
José Expósito 2021-09-21 19:21:03 +02:00
parent b6e8aef4fb
commit ceda09e87b

View file

@ -415,6 +415,11 @@ evdev_notify_axis_wheel(struct evdev_device *device,
struct normalized_coords delta = *delta_in;
struct wheel_v120 v120 = *v120_in;
if (device->scroll.invert_horizontal_scrolling) {
delta.x *= -1;
v120.x *= -1;
}
if (device->scroll.natural_scrolling_enabled) {
delta.x *= -1;
delta.y *= -1;