Skip to content

Fix Windows pointer drift on secondary monitors - #652

Merged
enaboapps merged 1 commit into
mainfrom
codex/651-fix-windows-secondary-monitor-pointer-drift
Aug 26, 2026
Merged

Fix Windows pointer drift on secondary monitors#652
enaboapps merged 1 commit into
mainfrom
codex/651-fix-windows-secondary-monitor-pointer-drift

Conversation

@enaboapps

Copy link
Copy Markdown
Contributor

Summary

  • replace Enigo relative movement on Windows with GetCursorPos and SetCursorPos
  • preserve axis-aligned deltas across positive and negative secondary-monitor coordinates
  • cover native movement through a fake cursor adapter, including overflow and sanitized failures

Why

Enigo 0.6.1 converts its default relative movement into primary-monitor absolute coordinates on Windows. That distorts movement when the cursor is on another monitor. Direct mouse moves and movement-repeat ticks both use this shared injector, so the native coordinate path fixes both.

Validation

  • Node.js 24.13.0
  • Rust 1.97.1
  • npm run lint
  • npm test, 74 tests passed
  • npm run build
  • cargo fmt --manifest-path src-tauri/Cargo.toml --check
  • cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets -- -D warnings
  • cargo test --manifest-path src-tauri/Cargo.toml, 220 unit tests and 2 configuration tests passed

Closes #651

@enaboapps

Copy link
Copy Markdown
Contributor Author

Independent exact-head review

Reviewed commit 652ef634dd481d723a3df5ef291731d80914a1d0 after implementation.

No findings. The reviewer confirmed that the native path preserves unchanged axes, handles negative coordinates and overflow, sanitizes Win32 failures, and is shared by direct and repeated movement.

Remaining manual check: exercise the packaged Windows build on a real secondary monitor, including a mixed-DPI or negative-origin layout where available.

@enaboapps

Copy link
Copy Markdown
Contributor Author

Final validation

All required CI passed at exact head 652ef634dd481d723a3df5ef291731d80914a1d0:

  • frontend
  • macOS app and DMG
  • Windows NSIS and UIAccess package verification

Local Node 24 and Rust 1.97.1 validation also passed. The independent exact-head review reported no findings.

The packaged build still needs the physical secondary-monitor movement check before release.

@enaboapps
enaboapps marked this pull request as ready for review August 26, 2026 10:53
@enaboapps
enaboapps merged commit 8011607 into main Aug 26, 2026
3 checks passed
@enaboapps
enaboapps deleted the codex/651-fix-windows-secondary-monitor-pointer-drift branch August 26, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix diagonal pointer drift on Windows secondary monitors

2 participants