Skip to content

Commit

Permalink
Layout: fixed End()/EndChild() incorrectly asserting if users manipul…
Browse files Browse the repository at this point in the history
…ates cursor position inside a collapsed/culled window and IMGUI_DISABLE_OBSOLETE_FUNCTIONS is enabled. (#5548, #5911)
  • Loading branch information
ocornut committed Nov 23, 2022
1 parent 3a68574 commit c3d9f8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ HOW TO UPDATE?
- Inputs: fixed moving a window or drag and dropping from preventing input-owner-unaware code
from accessing keys. (#5888, #4921, #456)
- Inputs: fixed moving a window or drag and dropping from capturing mods. (#5888, #4921, #456)
- Layout: fixed End()/EndChild() incorrectly asserting if users manipulates cursor position
inside a collapsed/culled window and IMGUI_DISABLE_OBSOLETE_FUNCTIONS is enabled. (#5548, #5911)
- ColorEdit: fixed label overlapping when using style.ColorButtonPosition == ImGuiDir_Left to
move the color button on the left side (regression introduced in 1.88 WIP 2022/02/28). (#5912)
- Backends: GLFW: cancel out errors emitted by glfwGetKeyName() when a name is missing. (#5908)
Expand Down
2 changes: 2 additions & 0 deletions imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8694,6 +8694,8 @@ void ImGui::ErrorCheckUsingSetCursorPosToExtendParentBoundaries()
#ifdef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
if (window->DC.CursorPos.x <= window->DC.CursorMaxPos.x && window->DC.CursorPos.y <= window->DC.CursorMaxPos.y)
return;
if (window->SkipItems)
return;
IM_ASSERT(0 && "Code uses SetCursorPos()/SetCursorScreenPos() to extend window/parent boundaries. Please submit an item e.g. Dummy() to validate extent.");
#else
window->DC.CursorMaxPos = ImMax(window->DC.CursorMaxPos, window->DC.CursorPos);
Expand Down

0 comments on commit c3d9f8e

Please sign in to comment.