From e2082a675c209b3135eae4abcc0f4413662965e7 Mon Sep 17 00:00:00 2001 From: omar Date: Wed, 5 Dec 2018 23:38:37 +0100 Subject: [PATCH] Viewport: Fix handling of PlatformRequestResize/PlatformRequestPos. when OS decoration are enabled via ImGuiConfigFlags_ViewportsDecoration . --- imgui.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index d1651cf3..5110b07a 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -7687,8 +7687,10 @@ ImGuiViewportP* ImGui::AddUpdateViewport(ImGuiWindow* window, ImGuiID id, const ImGuiViewportP* viewport = (ImGuiViewportP*)FindViewportByID(id); if (viewport) { - viewport->Pos = pos; - viewport->Size = size; + if (!viewport->PlatformRequestMove) + viewport->Pos = pos; + if (!viewport->PlatformRequestResize) + viewport->Size = size; } else {