aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-03-17 08:02:00 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-03-23 16:36:03 +1000
commitd07692a4af507504b2d3c5a2172b8b23a4d7e2f4 (patch)
treedcf6cfddda019961686358aeababdb14ac953565
parentSet "rel" when converting absolute touchpad coordinates to relative (#20661) (diff)
downloadxf86-input-evdev-d07692a4af507504b2d3c5a2172b8b23a4d7e2f4.tar.gz
xf86-input-evdev-d07692a4af507504b2d3c5a2172b8b23a4d7e2f4.tar.bz2
xf86-input-evdev-d07692a4af507504b2d3c5a2172b8b23a4d7e2f4.zip
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> (cherry picked from commit 7ac0c4456dc0846f7e09f334a26f9536e20065df)
-rw-r--r--src/evdev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/evdev.c b/src/evdev.c
index fd4ad2d..6ec7374 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1472,9 +1472,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);