From ceda09e87b1fedfad0a3c5e8a992cb2127e03427 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= Date: Tue, 21 Sep 2021 19:21:03 +0200 Subject: [PATCH] evdev: v120 scroll: invert horizontal scrolling quirk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/evdev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/evdev.c b/src/evdev.c index f332bc1b..d2ce8631 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -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;