mirror of
https://github.com/ocornut/imgui.git
synced 2024-12-11 11:29:02 +08:00
Viewports: Fixed main viewport size not matching ImDrawData::DisplaySize for one frame during resize when multi-viewports are disabled. (#4900)
This commit is contained in:
parent
aa86800092
commit
1e14cc5cae
@ -98,6 +98,16 @@ Other changes:
|
||||
Note that Linux/Mac still have inconsistent support for multi-viewports. If you want to help see https://github.com/ocornut/imgui/issues/2117.
|
||||
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
VERSION 1.88 WIP (In Progress)
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
Docking+Viewports Branch:
|
||||
|
||||
- Viewports: Fixed main viewport size not matching ImDrawData::DisplaySize for one frame during resize
|
||||
when multi-viewports are disabled. (#4900)
|
||||
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
VERSION 1.87 (Released 2022-02-07)
|
||||
-----------------------------------------------------------------------
|
||||
|
@ -12903,9 +12903,10 @@ ImGuiViewportP* ImGui::AddUpdateViewport(ImGuiWindow* window, ImGuiID id, const
|
||||
ImGuiViewportP* viewport = (ImGuiViewportP*)FindViewportByID(id);
|
||||
if (viewport)
|
||||
{
|
||||
if (!viewport->PlatformRequestMove)
|
||||
// Always update for main viewport as we are already pulling correct platform pos/size (see #4900)
|
||||
if (!viewport->PlatformRequestMove || viewport->ID == IMGUI_VIEWPORT_DEFAULT_ID)
|
||||
viewport->Pos = pos;
|
||||
if (!viewport->PlatformRequestResize)
|
||||
if (!viewport->PlatformRequestResize || viewport->ID == IMGUI_VIEWPORT_DEFAULT_ID)
|
||||
viewport->Size = size;
|
||||
viewport->Flags = flags | (viewport->Flags & ImGuiViewportFlags_Minimized); // Preserve existing flags
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user