touchpad: remove assert that may trigger during a race condition
authorPeter Hutterer <peter.hutterer@who-t.net>
Sun, 24 Nov 2024 10:36:18 +0000 (20:36 +1000)
committerMarge Bot <emma+marge@anholt.net>
Sun, 1 Dec 2024 22:44:50 +0000 (22:44 +0000)
commitd773056d2eda33c2da0ce2a9ce6d4278c0785da4
tree8755c41ed6e8c94b9714f460072be7735637b9e4
parent5915ac45ddab5f4f7e7648105cda5d3b00b43db1
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>
src/evdev-mt-touchpad.c