Repository navigation
Host: put our windows on the interactive desktop - #16
Merged
Merged
Conversation
Started from another desktop (a sandbox's own, say), our windows landed where nobody sees them. The process now switches to the WinSta0 window station and each window-making thread (main, the host window thread, the stand-in thread, title threads at CreateWindowEx) to its Default desktop before its first window. Failures leave things as they were. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EnumWindows, GetForegroundWindow and GetAsyncKeyState answer only for the calling thread's desktop. Started elsewhere, the presenting thread missed the title's stand-in and made a second window, and the input thread saw no focus and no keys. Both threads now attach to the Default desktop too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Puts our windows on the interactive desktop (
WinSta0\Default) even when VIctory is started from another desktop, e.g. a sandbox's own.victory_gpu::desktop::attach(): once per process it opensWinSta0(SetProcessWindowStation) and theDefaultdesktop (handle stays open for the process's life). Then, once per thread, it callsSetThreadDesktop.attach()runs on every thread that makes windows:main, the host window thread, the stand-in thread, and title threads in theCreateWindowExW/Ahooks.Gate: clippy (
victory-gpu,victory-hle,victorywith diagnostics) clean,cargo xtask policyok. Not live-tested yet.🤖 Generated with Claude Code