File xf86-input-evdev-btn-touch.diff of Package xorg-x11-driver-input
--- xf86-input-evdev-1.1.5-ORIGINAL/src/evdev_btn.c 2008-11-22 02:51:13.000000000 -0500
+++ xf86-input-evdev-1.1.5/src/evdev_btn.c 2008-11-22 03:46:37.000000000 -0500
@@ -256,7 +256,9 @@ EvdevBtnNew0(InputInfoPtr pInfo)
bit -= BTN_MOUSE - BTN_MISC;
} else if ((bit >= BTN_MISC) && (bit < BTN_MOUSE)) {
bit += BTN_MOUSE - BTN_MISC;
- }
+ } else if (bit == BTN_TOUCH) {
+ bit = BTN_0;
+ }
bit -= BTN_MISC;
state->btn->real_buttons = bit + 1;
}
@@ -312,6 +314,8 @@ EvdevBtnProcess (InputInfoPtr pInfo, str
button -= BTN_MOUSE - BTN_MISC;
} else if ((ev->code >= BTN_MISC) && (ev->code < BTN_MOUSE)) {
button += BTN_MOUSE - BTN_MISC;
+ } else if (ev->code == BTN_TOUCH) {
+ button = BTN_0;
}
button -= BTN_MISC;
@@ -348,6 +352,8 @@ EvdevBtnExists (InputInfoPtr pInfo, int
button -= BTN_MOUSE - BTN_MISC;
} else if ((button >= BTN_MISC) && (button < BTN_MOUSE)) {
button += BTN_MOUSE - BTN_MISC;
+ } else if (button == BTN_TOUCH) {
+ button = BTN_0;
}
xf86Msg(X_INFO, "%s: Checking bit %d\n", pInfo->name, button);