summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolai Kondrashov <spbnick@gmail.com>2010-08-31 11:31:07 +0400
committerPeter Hutterer <peter.hutterer@who-t.net>2010-09-01 12:48:04 +1000
commit10493de96e905b831e14bd510f2af1b8da3d2be6 (patch)
tree31b517430cf8f9b76358142c3fba231be3968326
parent829facd516d90f92187b78ccf6d921a1b1671990 (diff)
Improve dumb tablet detection
Improve dumb tablet detection by checking if BTN_STYLUS or BTN_STYLUS2 (first or second pen barrel button) is present when BTN_TOOL_PEN is not found. This enables detection of tablets without explicit tool proximity reporting. These include at least four UC-Logic tablet models: WP4030U, WP5540U, WP8060U and PF1209, on which many Genius and Trust models are based. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/evdev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 0c96344..626a3ae 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1888,7 +1888,9 @@ EvdevProbe(InputInfoPtr pInfo)
if ((TestBit(ABS_X, pEvdev->abs_bitmask) &&
TestBit(ABS_Y, pEvdev->abs_bitmask))) {
xf86Msg(X_PROBED, "%s: Found x and y absolute axes\n", pInfo->name);
- if (TestBit(BTN_TOOL_PEN, pEvdev->key_bitmask))
+ if (TestBit(BTN_TOOL_PEN, pEvdev->key_bitmask) ||
+ TestBit(BTN_STYLUS, pEvdev->key_bitmask) ||
+ TestBit(BTN_STYLUS2, pEvdev->key_bitmask))
{
xf86Msg(X_PROBED, "%s: Found absolute tablet.\n", pInfo->name);
pEvdev->flags |= EVDEV_TABLET;