mirror of
https://github.com/ocornut/imgui.git
synced 2026-02-04 04:00:07 +00:00
Viewports: Fixed active InputText() from preventing viewports to merge. (#4212)
This commit is contained in:
parent
8567a4cca3
commit
007a427e0a
2 changed files with 3 additions and 1 deletions
|
|
@ -12925,7 +12925,8 @@ static void ImGui::WindowSelectViewport(ImGuiWindow* window)
|
|||
{
|
||||
// Merge into host viewport?
|
||||
// We cannot test window->ViewportOwned as it set lower in the function.
|
||||
bool try_to_merge_into_host_viewport = (window->Viewport && window == window->Viewport->Window && g.ActiveId == 0);
|
||||
// Testing (g.ActiveId == 0 || g.ActiveIdAllowOverlap) to avoid merging during a short-term widget interaction. Main intent was to avoid during resize (see #4212)
|
||||
bool try_to_merge_into_host_viewport = (window->Viewport && window == window->Viewport->Window && (g.ActiveId == 0 || g.ActiveIdAllowOverlap));
|
||||
if (try_to_merge_into_host_viewport)
|
||||
UpdateTryMergeWindowIntoHostViewports(window);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue