F11 — Scroll fidelity
A notched wheel click, a trackpad fling with momentum, and a high-resolution wheel are three different signals that frameworks routinely flatten into one lossy number. This demo logs the raw scroll stream per device class.
Requirements
- Log every scroll event with its full native payload, from both a notched wheel and a trackpad (where present):
- Wayland:
wl_pointer.axisvalue +axis_v120(120ths) +axis_source(wheel/finger/continuous) +axis_stop+ frame grouping (wl_pointer.frame). - X11: legacy buttons 4/5/6/7 AND XInput2 smooth scrolling (
XI_Motionvaluators withXIScrollClass) — log both representations of the same physical scroll. - Win32:
WM_MOUSEWHEEL/WM_MOUSEHWHEELrawwheelDelta, demonstrating correct accumulation of sub-120 deltas (precision touchpads send fractions ofWHEEL_DELTA) until a line-scroll threshold; logSPI_GETWHEELSCROLLLINES. - macOS:
scrollWheel:withscrollingDeltaX/Y,hasPreciseScrollingDeltas, phases (phase/momentumPhasebegan/changed/ended) through a full fling.
- Wayland:
- Render a scrollable ruler so over/under-scroll bugs are visible; print per-gesture totals.
- Capture one identical physical gesture on both device classes and diff the event streams.
Instrumentation
scroll axis=v|h value=… v120=… source=… phase=… (fields as available per platform), scroll_stop, gesture summary lines.
Findings to record
- Per platform: the smallest representable scroll step, how device class is distinguished, and how momentum is delivered (events vs app-synthesized).
- The Win32 accumulation contract (what breaks if you truncate instead of accumulate).
- The X11 dual representation and its double-event trap (core + XI2 for one scroll).
- What a lossless framework scroll event must carry.
Verification
Wheel halves: Wayland/X11 Tier A with synthetic wheel input (xdotool click 4/5; weston test clients). Trackpad halves (momentum, phases, fractional deltas) need real hardware: Tier C on the Mac trackpad and a Windows precision touchpad. A[wine] covers Win32 message plumbing only.