mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Viewports: fixed crsah in UpdateTryMergeWindowIntoHostViewport(). (#8948)
Amend e7aa0de. Reproed in "testengine_cov_perftool".
This commit is contained in:
parent
8f3f428228
commit
cab82d9c76
1 changed files with 3 additions and 2 deletions
|
|
@ -16424,8 +16424,9 @@ static bool ImGui::UpdateTryMergeWindowIntoHostViewport(ImGuiWindow* window, ImG
|
|||
if (viewport_2 == viewport || viewport_2 == window->Viewport)
|
||||
continue;
|
||||
if (viewport_2->GetMainRect().Overlaps(window->Rect()))
|
||||
if (IsViewportAbove(viewport_2, viewport) && !IsViewportAbove(viewport_2, window->Viewport))
|
||||
return false;
|
||||
if (IsViewportAbove(viewport_2, viewport))
|
||||
if (window->Viewport == NULL || !IsViewportAbove(viewport_2, window->Viewport))
|
||||
return false;
|
||||
}
|
||||
|
||||
// Move to the existing viewport, Move child/hosted windows as well (FIXME-OPT: iterate child)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue