summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoïc Yhuel <loic.yhuel@gmail.com>2014-07-12 07:29:24 +0200
committerPeter Hutterer <peter.hutterer@who-t.net>2014-07-14 08:54:23 +1000
commitde58228aaf226baac21f4bb31712f7257b221370 (patch)
tree178361c917675f7fdb27ab7022cc6f3935b18617
parent336f8633837abe4a1e5ba84b53ac8b9dac5d29a2 (diff)
Fix wheel button labels
Wheel is using buttons 4/5, but btn_labels array is 0-based. It matches mouse and evdev drivers, and fixes wheel in Qt5.3. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/vmmouse.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vmmouse.c b/src/vmmouse.c
index 523f4fd..7ed94e9 100644
--- a/src/vmmouse.c
+++ b/src/vmmouse.c
@@ -868,10 +868,10 @@ VMMouseDeviceControl(DeviceIntPtr device, int mode)
btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT);
btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE);
btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT);
- btn_labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP);
- btn_labels[5] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN);
- btn_labels[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_LEFT);
- btn_labels[7] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT);
+ btn_labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP);
+ btn_labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN);
+ btn_labels[5] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_LEFT);
+ btn_labels[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT);
/* other buttons are unknown */
#ifdef ABS_VALUATOR_AXES