diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-01-19 21:23:34 +1100 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-01-19 21:23:34 +1100 |
commit | a7e8af65fca9c38a8c0c24ffc660c06c8d4a0b9b (patch) | |
tree | 9e69e0a97915f1f9d06d29c499dbf6e7280d3d20 | |
parent | Disable middle mouse button emulation when a middle mouse button event is reg... (diff) | |
download | xf86-input-evdev-a7e8af65fca9c38a8c0c24ffc660c06c8d4a0b9b.tar.gz xf86-input-evdev-a7e8af65fca9c38a8c0c24ffc660c06c8d4a0b9b.tar.bz2 xf86-input-evdev-a7e8af65fca9c38a8c0c24ffc660c06c8d4a0b9b.zip |
Test for pressure BEFORE using has_pressure.
-rw-r--r-- | src/evdev.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/evdev.c b/src/evdev.c index b1e5c9a..576fe62 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1392,6 +1392,17 @@ EvdevProbe(InputInfoPtr pInfo) has_scroll = TRUE; } + if (TestBit(ABS_PRESSURE, abs_bitmask)) { + struct input_absinfo absinfo_p; + + /* More than two pressure levels indicate it's not a button */ + if (ioctl(pInfo->fd, + EVIOCGABS(ABS_PRESSURE), &absinfo_p) == 0) { + if ((absinfo_p.maximum - absinfo_p.minimum) > 1) + pEvdev->has_pressure = TRUE; + } + } + if (TestBit(ABS_X, abs_bitmask) && TestBit(ABS_Y, abs_bitmask)) { xf86Msg(X_INFO, "%s: Found x and y absolute axes\n", pInfo->name); pEvdev->flags |= EVDEV_ABSOLUTE_EVENTS; @@ -1409,17 +1420,6 @@ EvdevProbe(InputInfoPtr pInfo) has_axes = TRUE; } - if (TestBit(ABS_PRESSURE, abs_bitmask)) { - struct input_absinfo absinfo_p; - - /* More than two pressure levels indicate it's not a button */ - if (ioctl(pInfo->fd, - EVIOCGABS(ABS_PRESSURE), &absinfo_p) == 0) { - if ((absinfo_p.maximum - absinfo_p.minimum) > 1) - pEvdev->has_pressure = TRUE; - } - } - for (i = 0; i < BTN_MISC; i++) if (TestBit(i, key_bitmask)) break; |