feat(agent): Wayland scroll via portal NotifyPointerAxisDiscrete (VA-83) #88

Merged
Claude-Run merged 1 commit from fix/VA-83-wayland-scroll-axis into main 2026-06-29 14:23:12 +02:00
Member

Mouse-wheel scrolling did nothing on a Wayland host: the portal input path's scroll branch in run_desktop was an empty stub, so wheel deltas were silently dropped (XTEST buttons 4/5 do not reach Wayland-native clients on GNOME/KDE).

Add PortalSession::pointer_axis_discrete wrapping ashpd RemoteDesktop NotifyPointerAxisDiscrete, plus a free pointer_axis_discrete convenience and a re-exported ScrollAxis so the agent does not take a direct ashpd dependency. The no-feature stub module gains matching no-op shims so the headless build still compiles.

Wire the Wayland scroll branch to call it via a new pure helper scroll_delta_to_axis_steps: the SPA sends a signed +/-120-per-notch delta (positive = up, same sense as the X11 ScrollUp button); portal discrete steps follow the wl_pointer convention (positive = down), so the sign is inverted and the magnitude is one step per notch (never zero). A unit test pins the sign, scaling, and i16::MIN safety. The X11 XTEST scroll path is unchanged.

#VA-83

Mouse-wheel scrolling did nothing on a Wayland host: the portal input path's scroll branch in `run_desktop` was an empty stub, so wheel deltas were silently dropped (XTEST buttons 4/5 do not reach Wayland-native clients on GNOME/KDE). Add `PortalSession::pointer_axis_discrete` wrapping ashpd RemoteDesktop `NotifyPointerAxisDiscrete`, plus a free `pointer_axis_discrete` convenience and a re-exported `ScrollAxis` so the agent does not take a direct ashpd dependency. The no-feature stub module gains matching no-op shims so the headless build still compiles. Wire the Wayland scroll branch to call it via a new pure helper `scroll_delta_to_axis_steps`: the SPA sends a signed +/-120-per-notch delta (positive = up, same sense as the X11 ScrollUp button); portal discrete steps follow the wl_pointer convention (positive = down), so the sign is inverted and the magnitude is one step per notch (never zero). A unit test pins the sign, scaling, and i16::MIN safety. The X11 XTEST scroll path is unchanged. #VA-83
feat(agent): Wayland scroll via portal NotifyPointerAxisDiscrete (VA-83)
All checks were successful
Check / fmt + clippy + tests (pull_request) Successful in 11m13s
Create release / Create release from merged PR (pull_request) Has been skipped
28c0cb5bc5
Mouse-wheel scrolling did nothing on a Wayland host: the portal input path's scroll branch in `run_desktop` was an empty stub, so wheel deltas were silently dropped (XTEST buttons 4/5 do not reach Wayland-native clients on GNOME/KDE).

Add `PortalSession::pointer_axis_discrete` wrapping ashpd RemoteDesktop `NotifyPointerAxisDiscrete`, plus a free `pointer_axis_discrete` convenience and a re-exported `ScrollAxis` so the agent does not take a direct ashpd dependency. The no-feature stub module gains matching no-op shims so the headless build still compiles.

Wire the Wayland scroll branch to call it via a new pure helper `scroll_delta_to_axis_steps`: the SPA sends a signed +/-120-per-notch delta (positive = up, same sense as the X11 ScrollUp button); portal discrete steps follow the wl_pointer convention (positive = down), so the sign is inverted and the magnitude is one step per notch (never zero). A unit test pins the sign, scaling, and i16::MIN safety. The X11 XTEST scroll path is unchanged.

#VA-83
David deleted branch fix/VA-83-wayland-scroll-axis 2026-06-29 15:05:54 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/vervain-agent!88
No description provided.