Comments, tweak

This commit is contained in:
omar
2018-12-03 18:17:50 +01:00
parent eb311abc92
commit fb6ef8b1db
2 changed files with 5 additions and 4 deletions

View File

@ -3299,8 +3299,9 @@ void ImGui::NewFrame()
g.CurrentPopupStack.resize(0);
ClosePopupsOverWindow(g.NavWindow);
// Create implicit window - we will only render it if the user has added something to it.
// Create implicit/fallback window - which we will only render it if the user has added something to it.
// We don't use "Debug" to avoid colliding with user trying to create a "Debug" window with custom flags.
// This fallback is particularly important as it avoid ImGui:: calls from crashing.
SetNextWindowSize(ImVec2(400,400), ImGuiCond_FirstUseEver);
Begin("Debug##Default");
@ -4455,7 +4456,7 @@ static void ImGui::UpdateManualResize(ImGuiWindow* window, const ImVec2& size_au
ImGuiWindowFlags flags = window->Flags;
if ((flags & ImGuiWindowFlags_NoResize) || (flags & ImGuiWindowFlags_AlwaysAutoResize) || window->AutoFitFramesX > 0 || window->AutoFitFramesY > 0)
return;
if (window->WasActive == false) // Early out to avoid running this code for e.g. an hidden implicit Debug window.
if (window->WasActive == false) // Early out to avoid running this code for e.g. an hidden implicit/fallback Debug window.
return;
const int resize_border_count = g.IO.ConfigResizeWindowsFromEdges ? 4 : 0;