diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2013-09-10 15:04:40 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2013-09-10 15:04:40 +1000 |
commit | 4ca57716ca4d0bea7bcd9a52e88e5cf7064a9ad9 (patch) | |
tree | 305f4a87dc44394f5d75d2f6b8e711b0843cf673 /src | |
parent | 0f16065b00436c5df48af6e1d6a18e2ed27a12fd (diff) |
Drop ABS_MT_SLOT minimum - the kernel guarantees a minimum of 0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/evdev.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/evdev.c b/src/evdev.c index b97b841..a738cfa 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -762,8 +762,7 @@ EvdevProcessTouch(InputInfoPtr pInfo) static int num_slots(EvdevPtr pEvdev) { - int value = pEvdev->absinfo[ABS_MT_SLOT].maximum - - pEvdev->absinfo[ABS_MT_SLOT].minimum + 1; + int value = pEvdev->absinfo[ABS_MT_SLOT].maximum + 1; /* If we don't know how many slots there are, assume at least 10 */ return value > 1 ? value : 10; @@ -772,7 +771,7 @@ num_slots(EvdevPtr pEvdev) static int last_mt_vals_slot(EvdevPtr pEvdev) { - int value = pEvdev->cur_slot - pEvdev->absinfo[ABS_MT_SLOT].minimum; + int value = pEvdev->cur_slot; return value < num_slots(pEvdev) ? value : -1; } |