[PATCH RFC inputproto] Remove requirement for 1.0 == 1 unit of scrolling

Peter Hutterer peter.hutterer at who-t.net
Mon Aug 15 23:08:24 PDT 2011


This isn't true in most cases, especially where physical scroll axes are
involved. Wacom Intuos4 scroll rings have a unit size of 3.0 and the driver
historically sent one scroll event per 3.0 increment or decrement. Mapping
one scroll event to 1.0 makes the ring mostly unusable through legacy
button events.

Leave the exact mapping to the driver.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
I noticed this only works in the synaptics driver with a strict mapping
because it uses a virtual axis and does the normalization by dividing by
scroll_dist_vert (which is the scroll unit size). This can't work with those
devices that have real scroll axes though.

tbh, I'm beginning to wonder if automatic emulation code in the server is a
good idea after all.

 specs/XI2proto.txt |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/specs/XI2proto.txt b/specs/XI2proto.txt
index 20454a6..05dff44 100644
--- a/specs/XI2proto.txt
+++ b/specs/XI2proto.txt
@@ -132,12 +132,16 @@ events. Valuators for axes sending scrolling information should have the
 VertScroll or HorizScroll axis flag set.
 
 If scrolling valuators are present on a device, the server must provide
-two-way emulation between these valuators and the legacy button events. A
-cumulative value of 1.0 in either magnitude is considered to be equivalent
-to one button event for the legacy events, e.g. -2.0 on an axis marked with
+two-way emulation between these valuators and the legacy button events for
+each delta unit of scrolling. The delta value of one unit is
+device-dependent.
+
+One unit of scrolling in either direction is considered to be equivalent to
+one button event for the legacy events, e.g. for an unit size of 1.0, -2.0 on an axis marked with
 VertScroll sends two button press/release events for button 4. Likewise, a
 button press event for button 7 generates an event on the HorizScroll
-valuator with a value of +1.0.
+valuator with a value of +1.0. The server may accumulate deltas of less than
+one unit of scrolling.
 
 Any server providing this behaviour marks emulated button or valuator events
 with the XIPointerEmulated flag for DeviceEvents, and the XIRawEmulated flag
-- 
1.7.6


More information about the xorg-devel mailing list