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>
This commit is contained in:
Loïc Yhuel
2014-07-12 07:29:24 +02:00
committed by Peter Hutterer
parent 336f863383
commit de58228aaf

View File

@@ -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