[PATCH vmmouse] Fix wheel button labels
Loïc Yhuel
loic.yhuel at gmail.com
Fri Jul 11 22:29:24 PDT 2014
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.
---
src/vmmouse.c | 8 ++++----
1 file 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
--
2.0.1
More information about the xorg-devel
mailing list