Repository navigation
Bring the game window to the front when it first shows - #229
Merged
Merged
Conversation
The window is shown only once the first frame is ready, which can be well after the launcher started the game. By then another window, often the launcher's own, may be in front, and a game that opens behind it is easy to miss. The launcher already lets the game process take the foreground (AllowSetForegroundWindow in launcher_platform_win32.cpp), so the game asks for it when it shows the window. Windows only; the other platforms are unchanged. Co-Authored-By: Claude Sonnet 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.
What
When the game shows its window for the first time (after the first frame is ready), it now also calls
SetForegroundWindowon Windows.Why
The window is only shown once the first frame is ready, which can be well after the launcher started the game. By then another window, often the launcher's own, may be in front, and a game that opens behind it is easy to miss. The launcher already lets the game process take the foreground (
AllowSetForegroundWindowinlauncher_platform_win32.cpp), so the game only has to ask for it.Scope
src/native_presentation.cpp, inside the existing_WIN32branch. Other platforms are unchanged.Tested
mainmerged with other work of mine, where the test suite passed exceptnative_presentation(it creates a 37x23 window; on this machine, at 125% DPI, the client size is not 37 wide). The CI's Windows job runs that test and passes, so the failure is specific to my machine's DPI scaling.🤖 Generated with Claude Code