Viewport: Fix handling of PlatformRequestResize/PlatformRequestPos. when OS decoration are enabled via ImGuiConfigFlags_ViewportsDecoration .

This commit is contained in:
omar 2018-12-05 23:38:37 +01:00
parent 3a678d48b1
commit ac52d9d44c

View File

@ -7435,8 +7435,10 @@ ImGuiViewportP* ImGui::AddUpdateViewport(ImGuiWindow* window, ImGuiID id, const
ImGuiViewportP* viewport = (ImGuiViewportP*)FindViewportByID(id); ImGuiViewportP* viewport = (ImGuiViewportP*)FindViewportByID(id);
if (viewport) if (viewport)
{ {
viewport->Pos = pos; if (!viewport->PlatformRequestMove)
viewport->Size = size; viewport->Pos = pos;
if (!viewport->PlatformRequestResize)
viewport->Size = size;
} }
else else
{ {