Skip to content
  • Peter Hutterer's avatar
    tablet: handle custom proximity handling · 2f481ba4
    Peter Hutterer authored
    
    
    For the puck/lens cursor tool we need to artificially reduce proximity
    detection. These tools are usually used in a relative mode (i.e. like a mouse)
    and thus require lifting and resetting the tool multiple times to move across
    the screen. The tablets' distance detection goes too far, requiring the user
    to lift the device several cm on every move. This is uncomfortable.
    
    Introduce an artificial distance threshold for the devices with the default
    value taken from the X.Org wacom driver. If a tool is in proximity but outside
    of this range, fake proximity events accordingly.
    
    If a button was pressed while we were out of range we discard that event and
    send it later when we enter proximity again.
    
    This is the simple implementation that only takes one proximity out value (the
    one from the wacom driver) and applies it to all. Those devices that support a
    button/lens tool and have a different default threshold are well out of date.
    
    Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
    
    [rebased, tests updated for new axis percentage behavior (8d76734f
    
    )]
    
    Signed-off-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
    2f481ba4