mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-14 00:34:18 +00:00
Viewport: Fixed not clearing request flags in main viewport, which led some back-end (SDL) to break on resize as PlatformRequestResize would stay true forever and inhibit new sizes passed to AddUpdateViewport(). (#1542)
This commit is contained in:
parent
8dd83c5fe8
commit
d9fda22763
2 changed files with 8 additions and 6 deletions
|
|
@ -3818,6 +3818,7 @@ void ImGui::EndFrame()
|
|||
IM_ASSERT(viewport->Window != NULL);
|
||||
g.PlatformIO.Viewports.push_back(viewport);
|
||||
}
|
||||
g.Viewports[0]->ClearRequestFlags(); // Clear main viewport flags because UpdatePlatformWindows() won't do it and may not even be called
|
||||
|
||||
// Sort the window list so that all child windows are after their parent
|
||||
// We cannot do that on FocusWindow() because childs may not exist yet
|
||||
|
|
@ -7760,7 +7761,7 @@ void ImGui::UpdatePlatformWindows()
|
|||
}
|
||||
|
||||
// Clear request flags
|
||||
viewport->PlatformRequestClose = viewport->PlatformRequestMove = viewport->PlatformRequestResize = false;
|
||||
viewport->ClearRequestFlags();
|
||||
}
|
||||
|
||||
// Update our implicit z-order knowledge of platform windows, which is used when the back-end cannot provide io.MouseHoveredViewport.
|
||||
|
|
@ -7865,7 +7866,7 @@ void ImGui::DestroyPlatformWindow(ImGuiViewportP* viewport)
|
|||
viewport->PlatformHandle = NULL;
|
||||
viewport->RendererUserData = viewport->PlatformHandle = NULL;
|
||||
viewport->PlatformWindowCreated = false;
|
||||
viewport->PlatformRequestClose = viewport->PlatformRequestMove = viewport->PlatformRequestResize = false;
|
||||
viewport->ClearRequestFlags();
|
||||
}
|
||||
|
||||
void ImGui::DestroyPlatformWindows()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue