Input: Add smooth-scrolling support to GetPointerEvents
authorPeter Hutterer <peter.hutterer@who-t.net>
Tue, 15 Feb 2011 18:49:58 +0000 (18:49 +0000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 29 Sep 2011 23:24:18 +0000 (09:24 +1000)
commit3304bbff9b4ed63f1a47410a5320a136420ba2c6
tree8f0c9e5d1cd32476287cb426bc82fa7eda5e48a6
parent635a1f50bc65512ec491fe71b9dfa8cf9118e2c2
Input: Add smooth-scrolling support to GetPointerEvents

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 <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Xi/exevents.c
Xi/xiquerydevice.c
Xi/xiquerydevice.h
dix/devices.c
dix/getevents.c
include/exevents.h
include/inputstr.h
test/input.c
test/xi2/protocol-common.c
test/xi2/protocol-xiquerydevice.c