Skip to content
  • Peter Hutterer's avatar
    Input: Add smooth-scrolling support to GetPointerEvents · 3304bbff
    Peter Hutterer authored
    
    
    For scroll wheel support, we used to send buttons 4/5 and 6/7 for
    horizontal/vertical positive/negative scroll events.  For touchpads, we
    really want more fine-grained scroll values.  GetPointerEvents now
    accepts both old-school scroll button presses, and new-style scroll axis
    events, while emitting both types of events to support both old and new
    clients.
    
    This works with the new XIScrollClass to mark axes as scrolling axes.
    Drivers mark any valuators that send scroll events with SetScrollValuator.
    (Currently missing: the XIDeviceChangeEvent being sent when a driver changes
    a scroll axis at run-time. This can be added later.)
    
    Note: the SCROLL_TYPE enums are intentionally different values to the XI2
    proto values to avoid copy/overlapping range bugs.
    
    Co-authored-by: Daniel Stone's avatarDaniel Stone <daniel@fooishbar.org>
    Signed-off-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Daniel Stone's avatarDaniel Stone <daniel@fooishbar.org>
    3304bbff