fix(macos): calibrate remote pointer coordinates #15

Merged
hex merged 1 commit from fix/macos-pointer-calibration into main 2026-07-12 00:42:28 -04:00
Owner

Root cause

The SPA sends pointer coordinates normalized to 0..65535 relative to the captured frame. MacInput posted those values directly as CoreGraphics global points. On Retina displays and offset secondary monitors, clicks therefore landed far from the visible cursor.

Fix

  • map normalized coordinates into the active CoreGraphics display rectangle
  • apply logical-point scaling for Retina displays and virtual-desktop offsets
  • seed the mapping in helper-managed and fallback in-process paths
  • cover move, click, and wheel positioning

Verification

  • RED/GREEN unit tests for Retina center and offset secondary-display edges
  • cargo test -p zeno-agent (185 unit + 12 integration/source guards passed)
  • cargo clippy -p zeno-agent --all-targets -- -D warnings
  • cargo fmt --all --check
  • git diff --check
## Root cause The SPA sends pointer coordinates normalized to 0..65535 relative to the captured frame. MacInput posted those values directly as CoreGraphics global points. On Retina displays and offset secondary monitors, clicks therefore landed far from the visible cursor. ## Fix - map normalized coordinates into the active CoreGraphics display rectangle - apply logical-point scaling for Retina displays and virtual-desktop offsets - seed the mapping in helper-managed and fallback in-process paths - cover move, click, and wheel positioning ## Verification - RED/GREEN unit tests for Retina center and offset secondary-display edges - `cargo test -p zeno-agent` (185 unit + 12 integration/source guards passed) - `cargo clippy -p zeno-agent --all-targets -- -D warnings` - `cargo fmt --all --check` - `git diff --check`
fix(macos): calibrate remote pointer coordinates
All checks were successful
CI / Linux — musl agent (pull_request) Has been skipped
CI / macOS — agent build + package (pull_request) Successful in 12s
CI / Windows — fmt, clippy, test, agent (pull_request) Successful in 17m32s
CI / Publish server image (pull_request) Has been skipped
CI / Redeploy dev server (SSH to hermes-vm) (pull_request) Has been skipped
6af934e6ce
hex merged commit ee579e12c7 into main 2026-07-12 00:42:28 -04:00
Sign in to join this conversation.
No description provided.