diff options
author | Max Schwarz <max.schwarz@online.de> | 2011-10-04 22:06:08 +0200 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-10-06 10:55:16 +1000 |
commit | 765ef69295ddc473640c96f1b4f54e0b8bfc670e (patch) | |
tree | 244cabbdbfa2aa4fa90b4de65e9c43e5b4172395 | |
parent | 911e7368bf9c00d327e994a6f7a1d8d8f9b83c72 (diff) |
dix: fix inverted handling of legacy scroll button events
This bug led to inverted scrolling axes with drivers that support smooth
scrolling axes but send legacy button events.
Signed-off-by: Max Schwarz <Max@x-quadraht.de>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | dix/getevents.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/dix/getevents.c b/dix/getevents.c index ebf265377..97c3937b9 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -1330,21 +1330,22 @@ GetPointerEvents(InternalEvent *events, DeviceIntPtr pDev, int type, double val, adj; int axis; + /* Up is negative on valuators, down positive */ switch (buttons) { case 4: - adj = 1.0; + adj = -1.0; axis = v_scroll_axis; break; case 5: - adj = -1.0; + adj = 1.0; axis = v_scroll_axis; break; case 6: - adj = 1.0; + adj = -1.0; axis = h_scroll_axis; break; case 7: - adj = -1.0; + adj = 1.0; axis = h_scroll_axis; break; default: |