kiapanahi / kiapanahi/KuriousLabs.WindowsTilingWindowManager
Complete the Focus Manager (mouse-follows-focus, focus-follows-mouse, monocle/stack restacking)
- Dominant language
- C#
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
## Problem / goal
Complete the Focus Manager: synchronous user-driven focus changes, mouse-follows-focus, OS-delegated focus-follows-mouse, and monocle/stack restacking.
## References
- `DESIGN.md` §7 (Focus paragraph, in full) — synchronous-from-user-input-only focus changes via `SetForegroundWindow` + `GetForegroundWindow` verification + `AllowSetForegroundWindow` retry; mouse-follows-focus via `SetCursorPos` to frame-bounds center on `EVENT_SYSTEM_FOREGROUND` with self-caused-change suppression; focus-follows-mouse delegated to the OS via `SPI_SETACTIVEWINDOWTRACKING` (+TRKZORDER/TRKTIMEOUT), original SPI values captured on start and restored on exit; never `AttachThreadInput` or synthetic-Alt tricks; monocle/stack restacking via per-window `SetWindowPos(hwndInsertAfter, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE)`.
## Acceptance criteria
- [ ] Bastion changes focus only synchronously from the user's own input, verifying via `GetForegroundWindow` with one `AllowSetForegroundWindow` retry, accepting the OS's taskbar-flash degradation otherwise.
- [ ] Mouse-follows-focus moves the cursor to the newly-focused window's frame-bounds center on `EVENT_SYSTEM_FOREGROUND`, suppressing self-caused re-triggering.
- [ ] Focus-follows-mouse is implemented purely via `SPI_SETACTIVEWINDOWTRACKING` (+ TRKZORDER/TRKTIMEOUT) — original SPI values are captured at startup and restored on exit; `AttachThreadInput`/synthetic-Alt tricks are never used.
- [ ] Monocle/stack restacking uses `SetWindowPos(hwndInsertAfter, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE)`, honoring documented z-order/owned-window rules.
Contributor guide
Research direction
Start with DESIGN.md §7, especially the complete Focus paragraph, and map its requirements to the Focus Manager entry points. Verify synchronous foreground changes, OS focus tracking, cursor-move suppression, and monocle/stack restacking against the documented Windows API behavior. Done means all four acceptance-criteria groups pass without AttachThreadInput or synthetic-Alt techniques, with original SPI values restored on exit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100