diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 2f242742a..3eeee9231 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -88,6 +88,10 @@ Docking+Viewports Branch: - Viewports: - Fixed an issue where the implicit "Debug" window while hidden would erroneously interfere with merging secondary viewports into the main viewport. +- Docking: + - Fixed behavior change/regression in 1.92.8 where a window using the + ImGuiWindowFlags_AlwaysAutoResize flag would have ItemWidth default + change when docked. (#9355, #9443) [@reybits] ----------------------------------------------------------------------- diff --git a/imgui.cpp b/imgui.cpp index b1d3c8588..9262002aa 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -8591,7 +8591,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) // Default item width. Make it proportional to window size if window can be manually resized. // (we cannot use AutoFitFramesX/AutoFitFramesY which is a temporary state) bool is_resizable_width; - if (flags & ImGuiWindowFlags_ChildWindow) + if ((flags & ImGuiWindowFlags_ChildWindow) && !window->DockIsActive) is_resizable_width = (window->Size.x > 0.0f) && !(window->ChildFlags & (ImGuiChildFlags_AutoResizeX | ImGuiChildFlags_AlwaysAutoResize)); else is_resizable_width = (window->Size.x > 0.0f) && !(flags & ImGuiWindowFlags_AlwaysAutoResize);