Skip to content
  • Peter Hutterer's avatar
    touchpad: improve pointer jump detection · eca2f8c9
    Peter Hutterer authored
    Previously, we had a hard threshold of 20mm per event frame. That is just
    about achievable by really fast movements (in which case you don't care too
    much about the jumps anyway because you've already hit the edge of the screen).
    
    Sometimes pointer jumps have lower deltas that are achievable even on slower,
    more likely motions. Analysis of finger motion has shown that while a delta
    >7mm per event is possible, jumping _by_ 7mm between two events is unlikely
    and indicates a pointer jump. So let's diff the most recent delta and the
    current delta, if it increases by 7mm between two event frames let's say it's
    a pointer jump and discard it.
    
    Helps with but does not fully resolve:
    libinput/libinput#80
    libinput/libinput#36
    
    
    
    Signed-off-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
    eca2f8c9