mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-25 15:10:13 +01:00
touchpad: remove assert that may trigger during a race condition
There appears to be a race condition where an ABS_MT_TRACKING_ID -1 event is on the wire but libevdev_fetch_slot_value() for that slot already gives us -1 as well. If we just (re)opened our device, synching our slots would thus set zero active slots and then trigger the assert when that event is being processed. It's unclear how to reliably reproduce this issue but removing the assert and simply ignoring this event if we don't have active slots is correct anyway. Closes #1050 Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1081>
This commit is contained in:
parent
5915ac45dd
commit
d773056d2e
1 changed files with 1 additions and 2 deletions
|
|
@ -546,8 +546,7 @@ tp_process_absolute(struct tp_dispatch *tp,
|
|||
if (e->value != -1) {
|
||||
tp->nactive_slots += 1;
|
||||
tp_new_touch(tp, t, time);
|
||||
} else {
|
||||
assert(tp->nactive_slots >= 1);
|
||||
} else if (tp->nactive_slots >= 1) {
|
||||
tp->nactive_slots -= 1;
|
||||
tp_end_sequence(tp, t, time);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue