summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorUlf Brosziewski <bru@cvs.openbsd.org>2018-06-18 20:07:31 +0000
committerUlf Brosziewski <bru@cvs.openbsd.org>2018-06-18 20:07:31 +0000
commit971e8fe6dfb174117dc212e15b8b90a000953ca4 (patch)
treeb834a74d5d60896670b2afa1e98dba9aa64de6b4 /driver
parentcf53ee3f8570c1967a63c3b3e2d7445ef2798fcc (diff)
Improve the wheel emulation logic. Make the axis filtering symmetrical,
and less restrictive for vertical scrolling. Thanks to Jake Champlin for help with the issue. ok matthieu@
Diffstat (limited to 'driver')
-rw-r--r--driver/xf86-input-ws/src/emuwheel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/driver/xf86-input-ws/src/emuwheel.c b/driver/xf86-input-ws/src/emuwheel.c
index 93b1715af..567a2e891 100644
--- a/driver/xf86-input-ws/src/emuwheel.c
+++ b/driver/xf86-input-ws/src/emuwheel.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: emuwheel.c,v 1.3 2015/12/25 15:08:28 matthieu Exp $ */
+/* $OpenBSD: emuwheel.c,v 1.4 2018/06/18 20:07:30 bru Exp $ */
/*
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
* Copyright 1993 by David Dawes <dawes@xfree86.org>
@@ -115,7 +115,7 @@ wsWheelEmuFilterMotion(InputInfoPtr pInfo, int dx, int dy)
return TRUE;
}
- if (dx) {
+ if (abs(dx) > abs(dy)) {
pAxis = &(priv->emulateWheel.X);
pOtherAxis = &(priv->emulateWheel.Y);
value = dx;