Skip to content
  • Hans de Goede's avatar
    touchpad: Avoid spurious motion event for scroll movement below threshold · c0af1b57
    Hans de Goede authored and Peter Hutterer's avatar Peter Hutterer committed
    
    
    If the user puts down to fingers to scroll, then changes his mind and
    lifts them, without having them moved past the initial scroll threshold in
    either direction, then any movement which he has done will cause a spurious
    scroll event when the second finger down is lifted first.
    
    The problem is that t->is_pointer was not being set to false in this case,
    since that is done in tp_post_twofinger_scroll after checking scroll.state
    which never gets set in this scenario.
    
    Instead of changing the order, simply completely remove scroll.state completely
    it is a boolean, and everywhere we check for it we also check for the axis bits
    in state.direction, so it is not necessary.
    
    Also add a check to ensure there are no spurious motion events.
    
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    Reviewed-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
    c0af1b57