From 4b67ac6247a91bccf54647ded82dfcf39bd8a3a5 Mon Sep 17 00:00:00 2001 From: Rix Date: Tue, 20 Oct 2026 09:41:37 -0700 Subject: [PATCH] Keep the caption style after restore on Windows 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). --- src/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 07fec2e..b4819aa 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -710,6 +710,11 @@ int main(int argc, char** argv) { brand::load(assetDir.c_str()); if (!args.screenshot || args.splash) splash::load(assetDir.c_str(), !args.screenshot); ImGui_ImplSDL3_InitForOpenGL(window, ctx); + // The SDL3 backend turns SDL_BORDERLESS_WINDOWED_STYLE off for its own + // viewport windows. SDL reads that hint whenever it rebuilds this window's + // style (restore does). On Windows a maximized window without WS_CAPTION + // covers the taskbar. The editor opens no viewport windows. + SDL_SetHint("SDL_BORDERLESS_WINDOWED_STYLE", "1"); { // The backend places the IME box in window coordinates. ImGuiPlatformIO& pio = ImGui::GetPlatformIO();