From 5293106510ca457dd4ccf2e6d2e68749b6310263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Dumas?= Date: Tue, 12 Mar 2024 23:44:31 -0700 Subject: [PATCH] Copy data outside the ifdef. --- src/polyscope.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/polyscope.cpp b/src/polyscope.cpp index 4d086d85..acd06fb4 100644 --- a/src/polyscope.cpp +++ b/src/polyscope.cpp @@ -185,10 +185,9 @@ void pushContext(std::function callbackFunction, bool drawDefaultUI) { #ifdef IMGUI_HAS_DOCK // Propagate GLFW window handle to new context ImGui::GetMainViewport()->PlatformHandle = oldPlatformIO.Viewports[0]->PlatformHandle; - #else + #endif ImGui::GetIO().BackendPlatformUserData = oldIO.BackendPlatformUserData; ImGui::GetIO().BackendRendererUserData = oldIO.BackendRendererUserData; - #endif if (options::configureImGuiStyleCallback) { options::configureImGuiStyleCallback();