Skip to content

WIP: High-resolution scroll wheel support

Peter Hutterer requested to merge whot/gtk:wip/hi-res-scrolling into master

This is a new type of events, see the Wayland protocol merge request. Please leave any actual protocol discussion there so we only have this in one place and let's use this for the gtk patches.

For axis events of source wheel/tilt it effectively replaces the existing axis/axis_discrete events in favour of a value based on 1 wheel detent == value 120. This allows for finer-grained scrolling on HW that supports those devices - 4 events of 30 for example.

Those events should be assumed to be a separate event stream from the same device which means we will (likely, depends on the compositor's backwards compatibility requirements) get both legacy and new hires wheel events. Where a frame is a pure legacy frame the axis_v120 value is zero so we know we can ignore the rest.

Our code ends up as:

  • source finger/continuous - no changes
  • source wheel:
    • handle nonzero v120 events as smooth scroll events and pass them through accordingly
    • handle zero v120 events by throwing away axis data from this frame
    • handle axis/discrete without a v120 event as we did previously

Marked as WIP because we need the various bits to line up before we can start merging and, mea culpa, I've so far only tested this on top of 3.24.16. There is a Fedora 32 COPR for easy testing - provided you have the right hardware.

cc @carlosg

Merge request reports