diff --git a/backends/imgui_impl_osx.mm b/backends/imgui_impl_osx.mm index f5f554b2..229f3459 100644 --- a/backends/imgui_impl_osx.mm +++ b/backends/imgui_impl_osx.mm @@ -435,6 +435,7 @@ bool ImGui_ImplOSX_Init(NSView* view) bd->Window = view.window ?: NSApp.orderedWindows.firstObject; ImGuiViewport* main_viewport = ImGui::GetMainViewport(); main_viewport->PlatformHandle = main_viewport->PlatformHandleRaw = (__bridge_retained void*)bd->Window; + ImGui_ImplOSX_UpdateMonitors(); if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) ImGui_ImplOSX_InitPlatformInterface(); @@ -1088,7 +1089,6 @@ static void ImGui_ImplOSX_UpdateMonitors() static void ImGui_ImplOSX_InitPlatformInterface() { ImGui_ImplOSX_Data* bd = ImGui_ImplOSX_GetBackendData(); - ImGui_ImplOSX_UpdateMonitors(); // Register platform interface (will be coupled with a renderer interface) ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO(); diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index dc0dd2c5..16bfbf44 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -73,6 +73,8 @@ Docking+Viewports Branch: - Added ImGuiDockNodeFlags_DockedWindowsInFocusRoute to automatically make a dockspace connect the focus route of its docked window. This is provided a convenience in case you have windows where a connection is not explicit. (#6798) +- Backends: OSX: Fixed not submitting Monitors info when viewports are not enabled, leading to + missing e.g. DpiScale info. (#7257) [@actboy168] -----------------------------------------------------------------------