Skip to content

Commit

Permalink
Begin: FIx previous commit - no need to call on collapsed window. Han…
Browse files Browse the repository at this point in the history
…dle manual resize (grip, border, gamepad) before setting up window DrawList main clipping rectangle. Sane (and required for viewport code). (#822, #1542)
  • Loading branch information
ocornut committed Jan 11, 2018
1 parent 5e9ae92 commit cc173d7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit cc173d7

Please sign in to comment.