From a231c680364bc1f2070f26f449e5f9d6519d58f6 Mon Sep 17 00:00:00 2001 From: Ronan Cailleau Date: Sat, 29 Aug 2026 20:29:54 +0200 Subject: [PATCH] Viewports, SDL3: Fix secondary viewports collapse sizing - Fixes incorrect reduced size when un-collapsing window in secondary viewport - SImilar to #2756 --- backends/imgui_impl_sdl3.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backends/imgui_impl_sdl3.cpp b/backends/imgui_impl_sdl3.cpp index 2b26db377..89a58307a 100644 --- a/backends/imgui_impl_sdl3.cpp +++ b/backends/imgui_impl_sdl3.cpp @@ -526,7 +526,13 @@ bool ImGui_ImplSDL3_ProcessEvent(const SDL_Event* event) if (event->type == SDL_EVENT_WINDOW_MOVED) viewport->PlatformRequestMove = true; if (event->type == SDL_EVENT_WINDOW_RESIZED) - viewport->PlatformRequestResize = true; + { + int x = int(viewport->Size.x), y = int(viewport->Size.y); + if (x != event->window.data1 || y != event->window.data2) + { + viewport->PlatformRequestResize = true; + } + } return true; } case SDL_EVENT_GAMEPAD_ADDED: