Skip to content

Add opt-in touchscreen mouse independence and focus restoration - #729

Open
dhwon0916 wants to merge 3 commits into
mgth:masterfrom
dhwon0916:codex/touchscreen-support
Open

dhwon0916 wants to merge 3 commits into
mgth:masterfrom
dhwon0916:codex/touchscreen-support

Conversation

@dhwon0916

@dhwon0916 dhwon0916 commented Sep 23, 2026 •

Copy link
Copy Markdown

Summary

Adds opt-in touchscreen mouse independence: touch can use another display while the physical mouse returns to its saved position when movement resumes. Keyboard-focus restoration is separately optional; existing behavior remains the default.

  • Add display selection, modifier override, focus delay or restore-on-mouse-movement, per-app focus rules, and optional stylus support, with UI and persisted settings.
  • Handle native touch and AppBar swipes. Track the touched app during contact so opening another app does not incorrectly restore focus away from it.
  • Release owned mouse confinement before touch, including during modifier override. Preserve the mouse anchor and re-enable restoration on the next normal touch gesture.
  • Include regression tests and updated protocol/persistence snapshots.

Validation

  • Rust test suites passed for lbm-hook, lbm-engine, lbm-layout, lbm-store, and lbm-zones on the updated branch.
  • Clippy passed for lbm-hook and lbm-engine with all targets and warnings denied; Rust formatting and whitespace checks passed.
  • Prior validation of the unchanged C# implementation: 367 display-layout tests and 361 Avalonia UI tests passed.

Physical stylus behavior still needs hardware validation. Pen apps without tagged mouse events are not covered by the touchscreen HID observer. Windows or individual apps may refuse focus restoration.

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.

2 participants