Skip to content

Keep the caption style after restore on Windows - #224

Merged
rixnobis merged 1 commit into
mainfrom
win-maximize
Oct 20, 2026
Merged

rixnobis merged 1 commit into
mainfrom
win-maximize

Conversation

@rixnobis

@rixnobis rixnobis commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Fixes the last part of #162: maximize, restore, maximize on Windows covered the taskbar.

Dear ImGui's SDL3 backend sets SDL_BORDERLESS_WINDOWED_STYLE to 0 in ImGui_ImplSDL3_InitForOpenGL. SDL reads that hint whenever it rebuilds the window style, so after a restore the style went from 0x96CF0000 to 0x96070000 (no WS_CAPTION/WS_SYSMENU), and Windows maximizes a popup without a caption to the full monitor. Setting the hint back to 1 after the backend init keeps the caption bits; the editor opens no viewport windows.

Measured on Windows 11 at 1920x1080 (work area 1920x1032): on main the second maximize gives a window rect of -7,-7,1927,1087 over 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,1040 with the taskbar visible.

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).
@rixnobis
rixnobis merged commit 71a6a92 into main Oct 20, 2026
5 checks passed
@rixnobis
rixnobis deleted the win-maximize branch October 20, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant