Skip to content
  • Peter Hutterer's avatar
    touchpad: don't tap for 2fg down, followed by a single finger up · aa8ab6ce
    Peter Hutterer authored
    
    
    The following sequence currently generates a right-button event:
    	finger 1 down
    	finger 2 down
    	finger 1 up
    	finger 2 held down
    
    This is easily triggered with short scroll events. There are two issues here:
    first is that the tapping code elsewhere treats any tap with a second finger
    down as a left-button tap, not a right button one. So if anything, we should
    generate a left button click here, not a right button click.
    
    Arguably, generating a button click here is wrong though, it's not a very well
    defined sequence and relatively difficult to trigger intentionally. So the
    best solution here is to simply ignore the release event and move straight
    back to state HOLD - unless the second finger is released within the timeout.
    If the finger is set down again during the timeout, we move straight to
    TOUCH_2_HOLD - this could eventually be interpreted as a tap, but not for now.
    
    Signed-off-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
    (cherry picked from commit 79570fd4)
    aa8ab6ce