From cc173d7619180cfaf211dcc338b02c7938e0d221 Mon Sep 17 00:00:00 2001 From: omar Date: Thu, 11 Jan 2018 23:21:24 +0100 Subject: [PATCH] Begin: FIx previous commit - no need to call on collapsed window. Handle manual resize (grip, border, gamepad) before setting up window DrawList main clipping rectangle. Sane (and required for viewport code). (#822, #1542) --- imgui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 4f62a426c..1a1be7949 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -4750,7 +4750,8 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) ImU32 resize_grip_col[4] = { 0 }; const int resize_grip_count = (flags & ImGuiWindowFlags_ResizeFromAnySide) ? 2 : 1; // 4 const float grip_draw_size = (float)(int)ImMax(g.FontSize * 1.35f, window->WindowRounding + 1.0f + g.FontSize * 0.2f); - UpdateManualResize(window, size_auto_fit, &border_held, resize_grip_count, &resize_grip_col[0]); + if (!window->Collapsed) + UpdateManualResize(window, size_auto_fit, &border_held, resize_grip_count, &resize_grip_col[0]); // DRAWING