#589
Cancel virtual display recovery when an ended session defers display removal
Problem
Repro (Windows, Moonlight on Steam Deck): use Remote Monitor once, then stream Desktop and disconnect. The physical monitors come back, then go dark ~20s later.
Log:
Deferring display revert after app termination because another streaming session is still active.(the retained Remote Monitor keepshas_shared_runtime_owner()true)Virtual display recovery: re-applied session display configuration (including exclusivity) after recreation.
proc_t::terminate skips virtual display removal in that case and forgets the GUID, but the ended session's recovery monitor stays scheduled. When the display blinks, it recreates it and re-applies the ended session's exclusive layout.
Fix
In the deferred-removal branch, cancel the recovery monitor for that GUID. The display itself stays for the shared owner.
Testing
Built with MSYS2 UCRT64 and ran as the installed service. Unit tests not run locally.
🤖 Generated with Claude Code
Activity
2This pull request is a draft
Merging is unavailable until it is marked ready for review.
Thanks for tracing this. Development integration targets
canary; could you update this original PR's base tocanaryand bring the branch up to date with it? Please add and run a regression test for the deferred-removal path: the ended session's recovery must be cancelled while the shared display remains available, and a later display flicker must not reapply the ended session's exclusive layout. The PR notes that the unit suite has not yet been run.