touchpad: remove a workaround for an old libevdev bug

Require libevdev 1.9, released in 2020.

Reverts commit 1e1b9c0e60 ("touchpad: never reduce the slot count to 0")

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1224>
This commit is contained in:
Peter Hutterer 2025-06-16 16:41:19 +10:00
parent d67474645c
commit 76f88deb24
2 changed files with 1 additions and 13 deletions

View file

@ -163,7 +163,7 @@ config_h.set10('HAVE_INSTALLED_TESTS', get_option('install-tests'))
pkgconfig = import('pkgconfig')
dep_udev = dependency('libudev')
dep_mtdev = dependency('mtdev', version : '>= 1.1.0')
dep_libevdev = dependency('libevdev')
dep_libevdev = dependency('libevdev', version: '>= 1.9.0')
config_h.set10('HAVE_LIBEVDEV_DISABLE_PROPERTY',
dep_libevdev.version().version_compare('>= 1.9.902'))

View file

@ -671,21 +671,9 @@ tp_process_fake_touches(struct tp_dispatch *tp,
*
* All touchpad devices have at least one slot so we only do this
* for 2 touches or higher.
*
* There's an bug in libevdev < 1.9.0 affecting slots after a
* SYN_DROPPED. Where a user release one or more touches during
* SYN_DROPPED and places new ones on the touchpad, we may end up
* with fake touches but no active slots.
* So let's check for nactive_slots > 0 to make sure we don't lose
* all fingers. That's a workaround only, this must be fixed in
* libevdev.
*
* For a long explanation of what happens, see
* https://gitlab.freedesktop.org/libevdev/libevdev/merge_requests/19
*/
if (tp->device->model_flags & EVDEV_MODEL_ALPS_SERIAL_TOUCHPAD &&
nfake_touches > 1 && tp->has_mt &&
tp->nactive_slots > 0 &&
nfake_touches > tp->nactive_slots &&
tp->nactive_slots < tp->num_slots) {
evdev_log_bug_kernel(tp->device,