Skip to content

Commit 54ef409

Browse files
actboy168ocornut
authored andcommitted
Backends: OSX: Fixed not submitting Monitors info when viewports are not enabled. (#7257)
1 parent eb42e16 commit 54ef409

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

backends/imgui_impl_osx.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,7 @@ bool ImGui_ImplOSX_Init(NSView* view)
435435
bd->Window = view.window ?: NSApp.orderedWindows.firstObject;
436436
ImGuiViewport* main_viewport = ImGui::GetMainViewport();
437437
main_viewport->PlatformHandle = main_viewport->PlatformHandleRaw = (__bridge_retained void*)bd->Window;
438+
ImGui_ImplOSX_UpdateMonitors();
438439
if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
439440
ImGui_ImplOSX_InitPlatformInterface();
440441

@@ -1088,7 +1089,6 @@ static void ImGui_ImplOSX_UpdateMonitors()
10881089
static void ImGui_ImplOSX_InitPlatformInterface()
10891090
{
10901091
ImGui_ImplOSX_Data* bd = ImGui_ImplOSX_GetBackendData();
1091-
ImGui_ImplOSX_UpdateMonitors();
10921092

10931093
// Register platform interface (will be coupled with a renderer interface)
10941094
ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();

docs/CHANGELOG.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ Docking+Viewports Branch:
7373
- Added ImGuiDockNodeFlags_DockedWindowsInFocusRoute to automatically make a dockspace connect
7474
the focus route of its docked window. This is provided a convenience in case you have windows
7575
where a connection is not explicit. (#6798)
76+
- Backends: OSX: Fixed not submitting Monitors info when viewports are not enabled, leading to
77+
missing e.g. DpiScale info. (#7257) [@actboy168]
7678

7779

7880
-----------------------------------------------------------------------

0 commit comments

Comments
 (0)