Windows: Fixed first-time windows appearing in negative coordinates. (#5215, #3414)

Regression added in 6af92b05b
This commit is contained in:
Dima Koltun
2022-04-22 20:20:40 +02:00
committed by ocornut
parent 5b29d14783
commit b5b704d376
2 changed files with 4 additions and 1 deletions

View File

@ -5339,7 +5339,7 @@ static ImGuiWindow* CreateNewWindow(const char* name, ImGuiWindowFlags flags)
SetWindowConditionAllowFlags(window, ImGuiCond_FirstUseEver, false);
ApplyWindowSettings(window, settings);
}
window->DC.CursorStartPos = window->DC.CursorMaxPos = window->Pos; // So first call to CalcContentSize() doesn't return crazy values
window->DC.CursorStartPos = window->DC.CursorMaxPos = window->DC.IdealMaxPos = window->Pos; // So first call to CalcWindowContentSizes() doesn't return crazy values
if ((flags & ImGuiWindowFlags_AlwaysAutoResize) != 0)
{