Repository navigation
Add focus follows mouse without raising windows - #1419
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (23)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThis change adds an optional, default-off setting to focus eligible windows under the pointer. It adds window and device lookup, focus operations, event handling, system suspension behavior, UI controls, documentation, localization, and tests. ChangesHover Focus
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~45 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant GlobalEventTap
participant FocusFollowsMouseController
participant DeviceManager
participant HoverWindowQuery
participant WindowFocus
GlobalEventTap->>FocusFollowsMouseController: observe pointer event
FocusFollowsMouseController->>DeviceManager: identify sender device
FocusFollowsMouseController->>HoverWindowQuery: resolve and validate hovered target
FocusFollowsMouseController->>WindowFocus: perform focus for valid target
Merge Risk: ⚪ Minimal · up to No confirmed issue blocks merging. Hover focus remains optional and off by default; the unverified transformed-event behavior does not establish a failure. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The feature is opt-in and checks both the physical device and the exact hovered window before changing focus. Exposure is limited to local window interactions. Remaining risk concerns interrupted focus changes and undocumented macOS behavior; unauthorized focus or privilege escalation has not been demonstrated. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 9.38% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 64 functions across 19 files. (4 skipped: 4 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
|
Hi @lujjjh , so I'm testing the change and it's not always switching when the mouse is on a different window. It does sometimes, but not always. I'm testing this on Chrome. The window modification buttons (Close, Minimize, Maximize) should turn color when the focus is on that window, but it doesn't always seem to happen. I also tested moving from the LinearMouse settings window to Chrome and it doesn't change focus. |
Adds a “Focus windows on hover” option to pointer settings, configurable per device and application.
Focuses the window under the pointer without bringing it to the front, with support for multiple displays. Hold Control to pause.
Summary by CodeRabbit
New Features
Documentation
Closes #671.
Closes #1296.
Related to #1006.