Desktop 'lock' fix: the window no longer steals focus when a full-screen game owns the foreground at launch. Opening after an exclusive-fullscreen game (creator's THE DIVISION 2 gameplay-stream start) the window ACTIVATED by default, Windows dropped the game to the taskbar and the 1920x1040 window covered the whole work area - 'the desktop is locked and I can't reach the game with the mouse'. MainWindow ctor now sets ShowActivated = !MainViewModel.FullscreenGameRunningNow (GetForegroundFullScreenMonitorIndex() != null), so an in-game launch keeps the game focused and live; a normal launch is unchanged. New FullScreenDetectorOverride test seam (mirrors WindowEnumeratorOverride - deterministic, no real Win32 foreground state) + DesktopLockTests: game at launch -> ShowActivated=false, normal launch -> true, FullscreenGameRunningNow reflects the detector. 422 pass / 1 known env flake, 0 build warnings. (Unit: launch focus)

This commit is contained in:
2026-10-10 11:52:17 -07:00
parent c2d64dcd6d
commit 63bf8444bd
6 changed files with 221 additions and 4 deletions
+31 -3
View File
@@ -1,9 +1,30 @@
# HANDOFF — 2026-10-09 (TASK 51 quality pass COMPLETE: jitter + blur-heavy both fixed)
# HANDOFF — 2026-10-10 (desktop-"lock" fix local, uncommitted)
## At a glance
- **Branch** main (no feature branch). Pushed through `5685c5d`; everything after is local, **not
pushed** (push at the creator's call).
- Three work units in the working tree: (1) the desktop-lock fix below, (2) the TASK 51 webcam unit,
(3) the creator's pinned-chat unit. Do NOT mix them in one commit.
## Branch
- main (no feature branch). Pushed through `5685c5d` (TRAX toggle); everything after is local,
**not pushed** (push at the creator's call).
## New work unit (this handoff) — READY TO VERIFY, do not commit yet
- **Fix** for the "desktop is locked once the app starts" report — `MainWindow.xaml.cs` +
`ViewModels/MainViewModel.Background.cs` (`ShowActivated = !FullscreenGameRunningNow`, see
`bugs.md` entry 2026-10-10). Scope-locked files: `MainWindow.xaml.cs`,
`ViewModels/MainViewModel.Background.cs`, `ViewModels/MainViewModel.cs` (detector seam line),
`ytLive.Tests/DesktopLockTests.cs` (new), `bugs.md`, this file.
- **Regression tests:** `DesktopLockTests` (3 tests) drive the rule through the NEW
`FullScreenDetectorOverride` test seam (the same seam pattern as `WindowEnumeratorOverride`) —
no real Win32 foreground state is touched: full-screen game at launch ⇒ `ShowActivated=false`;
normal launch ⇒ still `true`; `FullscreenGameRunningNow` reflects the detector. Full suite
**422 passed / 0 failed / 0 warnings**. Real-app reproduction still deferred to the creator.
- **To commit later (this unit only):** the two code files + the two memory files listed above.
- Verify with the creator first: launch while an exclusive-fullscreen game is the foreground — the
game must stay live and the app must open behind/alongside it without focus steal.
## Dirty files — split by ownership
- **This work unit (COMMIT these):** `Services/BackgroundEffects/MaskSmoother.cs` (new), the smoother
wiring in `Services/CameraManager.cs`, `ytLive.Tests/CameraManagerTests.cs` (new integration test),
@@ -34,8 +55,15 @@
the 0.5 rounding (3 box passes dilute a spike) — use a step edge, not a spike, to measure blur.
## Next step
- Creator re-runs the app: webcam → Layers properties → Background → Remove / Blur + Strength, and
reports whether the jitter is gone and the blur feels right at the slider's default and full range.
- Creator verifies the desktop-lock fix: while THE DIVISION 2 (or any exclusive-fullscreen game) is the
foreground window, launch the app — the game must stay live and the app must not yank focus. Also
confirm a normal launch is unchanged. Then I can commit the unit and run the full suite when the
mouse is free.
## Tests
- Full suite **422 passed / 0 failed / 0 skipped / 0 warnings** (2026-10-10; includes the 3 new
`DesktopLockTests`). Known env flakes remain `Mix_HonorsProviderGains…` (fails while system audio
plays) and `RealMouseDrag…` (needs an idle desktop).
## Also still open
- **Vertical-format regression (STALE, not fixed):** 1080p60 vertical selection no longer shrinks the