Repository navigation
Keep the caption style after restore on Windows - #224
Merged
Merged
Conversation
The SDL3 backend sets SDL_BORDERLESS_WINDOWED_STYLE to 0, so restoring the window dropped WS_CAPTION and the next maximize covered the taskbar (#162).
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.
Fixes the last part of #162: maximize, restore, maximize on Windows covered the taskbar.
Dear ImGui's SDL3 backend sets
SDL_BORDERLESS_WINDOWED_STYLEto0inImGui_ImplSDL3_InitForOpenGL. SDL reads that hint whenever it rebuilds the window style, so after a restore the style went from0x96CF0000to0x96070000(noWS_CAPTION/WS_SYSMENU), and Windows maximizes a popup without a caption to the full monitor. Setting the hint back to1after the backend init keeps the caption bits; the editor opens no viewport windows.Measured on Windows 11 at 1920x1080 (work area 1920x1032): on
mainthe second maximize gives a window rect of-7,-7,1927,1087over the taskbar. Adding the two style bits back by hand before maximizing gives-8,-8,1928,1040, the same as the first maximize.With this branch's Windows build (4b67ac6) four maximize/restore cycles in a row all give
-8,-8,1928,1040with the taskbar visible.