mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-05-15 06:06:07 -06:00
[PR #415] [CLOSED] fix: negate macOS scroll delta to match wl_pointer/libei sign #408
Labels
No labels
Xorg
documentation
enhancement
macos
pull-request
question
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/lan-mouse#408
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/feschber/lan-mouse/pull/415
Author: @jondkinney
Created: 4/23/2026
Status: ❌ Closed
Base:
main← Head:fix/macos-scroll-sign📝 Commits (1)
bb17cf0fix: negate macOS scroll delta to match wl_pointer/libei sign📊 Changes
1 file changed (+8 additions, -4 deletions)
View changed files
📝
input-capture/src/macos.rs(+8 -4)📄 Description
Summary
macOS CGEvent scroll deltas use the opposite sign convention from
wl_pointer.axis(and the libei capture backend used on Linux hosts). On macOS, a positive delta means "content moves up" (finger-up gesture under natural scrolling), while on Wayland a positive axis value means "scroll-down direction". The wire protocol value was therefore landing on the sink with the sign flipped relative to what other capture backends produce, so scrolling felt backwards whenever the source machine was macOS.This normalizes the sign at capture time in
input-capture/src/macos.rsso the wire protocol stays source-agnostic — both continuous (trackpad/Magic Mouse point-delta) and line-based (mouse-wheel) scroll values are negated to match wl_pointer/libei semantics.Before / after
Test plan
V120_STEPS_PER_LINE * vcalculation.Notes
The fix deliberately lives in the macOS capture path rather than on the emission side, so the wire format stays consistent with what the libei capture backend already produces. No sink-side change is needed and Linux→Linux scrolling is unaffected.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.