diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-03-17 08:02:00 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-03-17 10:08:33 +1000 |
commit | 7ac0c4456dc0846f7e09f334a26f9536e20065df (patch) | |
tree | 7d7d5eb0a93874e10f995bc66d05679d2cb122ab /src | |
parent | b4f6ab126dfc897759559aae7ae32fbc0efe24d8 (diff) |
Assume touchscreen/touchpad if we have _either_ ABS_PRESSURE or BTN_TOUCH
Touchpads have pressure or touch and also BTN_TOOL_FINGER.
Touchscreens have either pressure or touch, but no finger.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/evdev.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/evdev.c b/src/evdev.c index c55d26d..d4e1073 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1492,9 +1492,9 @@ EvdevProbe(InputInfoPtr pInfo) TestBit(ABS_Y, pEvdev->abs_bitmask)) { xf86Msg(X_INFO, "%s: Found x and y absolute axes\n", pInfo->name); pEvdev->flags |= EVDEV_ABSOLUTE_EVENTS; - if (!TestBit(ABS_PRESSURE, pEvdev->abs_bitmask) && - TestBit(BTN_TOUCH, pEvdev->key_bitmask)) { - if (num_buttons) { + if (TestBit(ABS_PRESSURE, pEvdev->abs_bitmask) || + TestBit(BTN_TOUCH, pEvdev->key_bitmask)) { + if (num_buttons || TestBit(BTN_TOOL_FINGER, pEvdev->key_bitmask)) { xf86Msg(X_INFO, "%s: Found absolute touchpad\n", pInfo->name); pEvdev->flags |= EVDEV_TOUCHPAD; memset(pEvdev->old_vals, -1, sizeof(int) * pEvdev->num_vals); |