summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Expósito <jose.exposito89@gmail.com>2021-09-21 19:21:03 +0200
committerJosé Expósito <jose.exposito89@gmail.com>2021-09-21 19:21:03 +0200
commitceda09e87b1fedfad0a3c5e8a992cb2127e03427 (patch)
tree866d059e7f8bb63f426d1bca7d9d4cc94dc91799
parentb6e8aef4fb25b1334cb0ffa81b363d65078b8155 (diff)
downloadlibinput-ceda09e87b1fedfad0a3c5e8a992cb2127e03427.tar.gz
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>
-rw-r--r--src/evdev.c5
1 files changed, 5 insertions, 0 deletions
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;