• Peter Hutterer's avatar
    touchpad: only keep low-pressure fingers alive for 2+-slot touchpads · 3f5ff113
    Peter Hutterer authored
    Regression introduced by 3979b9e1, bug 105258.
    With that commit, we only ended real touches when we had less than nslots fake
    fingers down. i.e. tripletap on a 2 slot touchpad would not end the
    first/second touch even if the pressure goes below the threshold. e.g. Lenovo
    x270 needs this, see https://bugs.freedesktop.org/attachment.cgi?id=137672, it
    dips below the pressure threshold for the first slot and ends the second slot
    in the same frame as the third finger is detected. Fun times.
    
    Anyway, this breaks semi-mt touchpads, another fine category of devices,
    because some of those can detect hovering fingers at low pressure, see bug
    105535. Because semi-mt devices are generally garbage, we treat them as
    single-touch devices instead. So whenever two fingers are down, we treat both
    as above the pressure threshold, even when they're physicall hovering.
    
    Fix this by making the x270 fix conditional on at least 2 slots.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=105535Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
    3f5ff113
test-touchpad-tap.c 95.9 KB