summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@agamemnon.b5>2007-01-17 19:27:40 -0500
committerroot <root@agamemnon.b5>2007-01-17 19:27:40 -0500
commitd8d8f114caece4c26c777ae6eee57e66b1f499e7 (patch)
tree21c822e0a990e4b430456af60f7be7c5babf9611
parentebb30a554fe084a50c7281defea80c38bc1b0ddd (diff)
downloadxorg-driver-xf86-input-evdev-d8d8f114caece4c26c777ae6eee57e66b1f499e7.tar.gz
For reasons related to handling pathological remapping cases, and
differences between HID and X, pretend a middle button exists whenever a right button exists.
-rw-r--r--src/evdev_btn.c9
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)) {