Keep Mac cursor stationary during Linux control #9

Merged
erik merged 2 commits from fix/task-79d5a943-stationary-mac-cursor into main 2026-07-17 20:50:49 -05:00
Owner

Summary

Keep the Mac cursor hidden and detached from physical mouse movement while Linux has input control.

Task

task-79d5a943

Changes

  • Temporarily activate the accessory app before using foreground-only Core Graphics cursor APIs.
  • Park, disassociate, and hide the Mac cursor after Linux handoff.
  • Balance cursor visibility and association restoration for normal return, emergency return, disconnect, disable, and quit paths.
  • Preserve and restore the previously active application.
  • Document a reproducible cursor-capture regression check.

Testing

  • Unit tests passed
  • Manual testing performed

Manual testing verified that the cursor is hidden while Linux receives mouse input and is restored after Linux left-edge return, Control-Option-Escape, receiver disconnect, Disable, and Quit.

Checklist

  • ./scripts/pre-pr.sh passes
  • Documentation updated
  • No unrelated changes included
## Summary Keep the Mac cursor hidden and detached from physical mouse movement while Linux has input control. ## Task `task-79d5a943` ## Changes - Temporarily activate the accessory app before using foreground-only Core Graphics cursor APIs. - Park, disassociate, and hide the Mac cursor after Linux handoff. - Balance cursor visibility and association restoration for normal return, emergency return, disconnect, disable, and quit paths. - Preserve and restore the previously active application. - Document a reproducible cursor-capture regression check. ## Testing - [x] Unit tests passed - [x] Manual testing performed Manual testing verified that the cursor is hidden while Linux receives mouse input and is restored after Linux left-edge return, Control-Option-Escape, receiver disconnect, Disable, and Quit. ## Checklist - [x] `./scripts/pre-pr.sh` passes - [x] Documentation updated - [x] No unrelated changes included
fix: capture Mac cursor during Linux control
All checks were successful
CI / Rust build, lint, and test (pull_request) Successful in 12s
CI / Swift build, lint, and test (pull_request) Successful in 14s
0efab2436f
Task: #task-79d5a943
Author
Owner

Review summary

PR #9 is approved. The change activates the macOS app before applying foreground-only Core Graphics cursor APIs, tracks cursor capture state, and restores association, visibility, position, and the previously frontmost application across all return paths.

Acceptance criteria

  • met — The Mac cursor does not visibly move while Linux has control. Live testing confirmed it remains hidden/stationary while Linux receives movement.
  • met — Cursor visibility and mouse association are restored when Mac control returns. Live testing covered Linux left-edge return, receiver disconnect, Disable, and Quit.
  • met — Input forwarding and Control-Option-Escape continue to work. Live testing confirmed Linux movement delivery and emergency return restoration.
  • met — The fix has a reproducible regression test. The README documents handoff and all required recovery-path checks.

Verification

  • Forgejo CI run #26 passes Rust and Swift.
  • Local make check and make pre-pr passed.
  • Live macOS/Linux testing passed for handoff, normal return, emergency return, disconnect, Disable, and Quit.

Blocking issues

None.

Warnings

None.

Final verdict

Approved — all 4 acceptance criteria are met, with automated checks and reproducible live regression coverage.

### Review summary PR #9 is approved. The change activates the macOS app before applying foreground-only Core Graphics cursor APIs, tracks cursor capture state, and restores association, visibility, position, and the previously frontmost application across all return paths. ### Acceptance criteria - **met** — The Mac cursor does not visibly move while Linux has control. Live testing confirmed it remains hidden/stationary while Linux receives movement. - **met** — Cursor visibility and mouse association are restored when Mac control returns. Live testing covered Linux left-edge return, receiver disconnect, Disable, and Quit. - **met** — Input forwarding and Control-Option-Escape continue to work. Live testing confirmed Linux movement delivery and emergency return restoration. - **met** — The fix has a reproducible regression test. The README documents handoff and all required recovery-path checks. ### Verification - Forgejo CI run #26 passes Rust and Swift. - Local `make check` and `make pre-pr` passed. - Live macOS/Linux testing passed for handoff, normal return, emergency return, disconnect, Disable, and Quit. ### Blocking issues None. ### Warnings None. ### Final verdict **Approved** — all 4 acceptance criteria are met, with automated checks and reproducible live regression coverage.
fix: preserve mirrored keys during cursor capture
All checks were successful
CI / Rust build, lint, and test (pull_request) Successful in 11s
CI / Swift build, lint, and test (pull_request) Successful in 14s
011502d114
Task: #task-79d5a943
Author
Owner

Re-review update

  • PR: Forgejo PR #9 is open; this review supersedes the earlier stale approval and covers commit 011502d.
  • Result: approved.
  • Follow-up: Wait for explicit human merge approval.

Acceptance criteria

  • met — The Mac cursor does not visibly move while Linux has control. Live retesting confirmed it remains hidden and stationary.
  • met — Cursor visibility and mouse association are restored when Mac control returns. The change retains balanced capture/restoration across normal return, emergency return, disconnect, disable, and quit paths.
  • met — Input forwarding and Control-Option-Escape continue to work. The follow-up fix posts marked copies of mirrored number-key events directly to the previously active Mac application while forwarding them to Linux; live retesting confirmed numbers reach both Mac and Linux while cursor capture remains active.
  • met — The fix has a reproducible regression test. The README procedure now explicitly covers mirrored top-row numbers, stationary cursor behavior, and restoration paths.

Verification

  • Forgejo CI run #27 passes Rust and Swift.
  • Local make check and make pre-pr pass.
  • Live Mac/Linux retesting confirmed mirrored numbers reach both systems and the Mac cursor remains hidden/stationary.

Blocking issues

None.

Warnings

None.

Final verdict

Approved — all 4 acceptance criteria are met. The regression that invalidated the earlier review is fixed and covered by updated live verification.

### Re-review update - PR: Forgejo PR #9 is open; this review supersedes the earlier stale approval and covers commit `011502d`. - Result: **approved**. - Follow-up: Wait for explicit human merge approval. ### Acceptance criteria - **met** — The Mac cursor does not visibly move while Linux has control. Live retesting confirmed it remains hidden and stationary. - **met** — Cursor visibility and mouse association are restored when Mac control returns. The change retains balanced capture/restoration across normal return, emergency return, disconnect, disable, and quit paths. - **met** — Input forwarding and Control-Option-Escape continue to work. The follow-up fix posts marked copies of mirrored number-key events directly to the previously active Mac application while forwarding them to Linux; live retesting confirmed numbers reach both Mac and Linux while cursor capture remains active. - **met** — The fix has a reproducible regression test. The README procedure now explicitly covers mirrored top-row numbers, stationary cursor behavior, and restoration paths. ### Verification - Forgejo CI run #27 passes Rust and Swift. - Local `make check` and `make pre-pr` pass. - Live Mac/Linux retesting confirmed mirrored numbers reach both systems and the Mac cursor remains hidden/stationary. ### Blocking issues None. ### Warnings None. ### Final verdict **Approved** — all 4 acceptance criteria are met. The regression that invalidated the earlier review is fixed and covered by updated live verification.
erik merged commit 0e849dac85 into main 2026-07-17 20:50:49 -05: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
erik/kvshare!9
No description provided.