diff options
author | root <root@agamemnon.b5> | 2007-01-17 19:27:40 -0500 |
---|---|---|
committer | root <root@agamemnon.b5> | 2007-01-17 19:27:40 -0500 |
commit | d8d8f114caece4c26c777ae6eee57e66b1f499e7 (patch) | |
tree | 21c822e0a990e4b430456af60f7be7c5babf9611 /src/evdev_btn.c | |
parent | Fix a bug where we potentially wrote garbage events when LEDs change. (diff) | |
download | xf86-input-evdev-d8d8f114caece4c26c777ae6eee57e66b1f499e7.tar.gz xf86-input-evdev-d8d8f114caece4c26c777ae6eee57e66b1f499e7.tar.bz2 xf86-input-evdev-d8d8f114caece4c26c777ae6eee57e66b1f499e7.zip |
For reasons related to handling pathological remapping cases, and
differences between HID and X, pretend a middle button exists
whenever a right button exists.
Diffstat (limited to 'src/evdev_btn.c')
-rw-r--r-- | src/evdev_btn.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/evdev_btn.c b/src/evdev_btn.c index 0d4808e..b9bfe07 100644 --- a/src/evdev_btn.c +++ b/src/evdev_btn.c @@ -298,6 +298,15 @@ EvdevBtnNew0(InputInfoPtr pInfo) state->btn = Xcalloc (sizeof (evdevBtnRec)); + /* + * XXX: This is evil. + * For reasons related to handling pathological remapping cases, and + * differences between HID and X, pretend a middle button exists + * whenever a right button exists. + */ + if (test_bit (BTN_RIGHT, pEvdev->bits.key)) + set_bit (BTN_MIDDLE, pEvdev->bits.key); + for (i = BTN_MISC; i < (KEY_OK - 1); i++) { btn = i; if ((btn >= BTN_MOUSE) && (btn < BTN_JOYSTICK)) { |