1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-11 00:04:24 +00:00

Windows: fixed SetNextWindowCollapsed()/SetWindowCollapsed() breaking codepath that preserve last contents size when collapsed. (#7691)

This commit is contained in:
ocornut 2025-03-23 12:55:59 +01:00
parent 702a67807b
commit dbd9ae287a
2 changed files with 8 additions and 2 deletions

View file

@ -8228,8 +8228,10 @@ void ImGui::SetWindowCollapsed(ImGuiWindow* window, bool collapsed, ImGuiCond co
return;
window->SetWindowCollapsedAllowFlags &= ~(ImGuiCond_Once | ImGuiCond_FirstUseEver | ImGuiCond_Appearing);
// Set
window->Collapsed = collapsed;
// Queue applying in Begin()
if (window->WantCollapseToggle)
window->Collapsed ^= 1;
window->WantCollapseToggle = (window->Collapsed != collapsed);
}
void ImGui::SetWindowHitTestHole(ImGuiWindow* window, const ImVec2& pos, const ImVec2& size)