Skip to content

Commit

Permalink
Windows: Fixed first-time windows appearing in negative coordinates. (#…
Browse files Browse the repository at this point in the history
…5215, #3414)

Regression added in 6af92b0
  • Loading branch information
DimaKoltun authored and ocornut committed Apr 22, 2022
1 parent 5b29d14 commit b5b704d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ Other Changes:
Not that even thought you shouldn't need to disable io.ConfigInputTrickleEventQueue, you can
technically dynamically change its setting based on the context (e.g. disable only when hovering
or interacting with a game/3D view).
- Windows: Fixed first-time windows appearing in negative coordinates from being initialized
with a wrong size. This would most often be noticeable in multi-viewport mode (docking branch)
when spawning a window in a monitor with negative coordinates. (#5215, #3414) [@DimaKoltun]
- Clipper: Fixed a regression in 1.86 when not calling clipper.End() and late destructing the
clipper instance. High-level languages (Lua,Rust etc.) would typically be affected. (#4822)
- Layout: Fixed mixing up SameLine() and SetCursorPos() together from creating situations where line
Expand Down
2 changes: 1 addition & 1 deletion imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit b5b704d

Please sign in to comment.