mirror of
https://github.com/ocornut/imgui.git
synced 2025-10-16 06:55:59 +00:00
Backends: OSX: Fixed not submitting Monitors info when viewports are not enabled. (#7257)
This commit is contained in:
@@ -435,6 +435,7 @@ bool ImGui_ImplOSX_Init(NSView* view)
|
|||||||
bd->Window = view.window ?: NSApp.orderedWindows.firstObject;
|
bd->Window = view.window ?: NSApp.orderedWindows.firstObject;
|
||||||
ImGuiViewport* main_viewport = ImGui::GetMainViewport();
|
ImGuiViewport* main_viewport = ImGui::GetMainViewport();
|
||||||
main_viewport->PlatformHandle = main_viewport->PlatformHandleRaw = (__bridge_retained void*)bd->Window;
|
main_viewport->PlatformHandle = main_viewport->PlatformHandleRaw = (__bridge_retained void*)bd->Window;
|
||||||
|
ImGui_ImplOSX_UpdateMonitors();
|
||||||
if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
|
if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
|
||||||
ImGui_ImplOSX_InitPlatformInterface();
|
ImGui_ImplOSX_InitPlatformInterface();
|
||||||
|
|
||||||
@@ -1088,7 +1089,6 @@ static void ImGui_ImplOSX_UpdateMonitors()
|
|||||||
static void ImGui_ImplOSX_InitPlatformInterface()
|
static void ImGui_ImplOSX_InitPlatformInterface()
|
||||||
{
|
{
|
||||||
ImGui_ImplOSX_Data* bd = ImGui_ImplOSX_GetBackendData();
|
ImGui_ImplOSX_Data* bd = ImGui_ImplOSX_GetBackendData();
|
||||||
ImGui_ImplOSX_UpdateMonitors();
|
|
||||||
|
|
||||||
// Register platform interface (will be coupled with a renderer interface)
|
// Register platform interface (will be coupled with a renderer interface)
|
||||||
ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
|
ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
|
||||||
|
@@ -73,6 +73,8 @@ Docking+Viewports Branch:
|
|||||||
- Added ImGuiDockNodeFlags_DockedWindowsInFocusRoute to automatically make a dockspace connect
|
- 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
|
the focus route of its docked window. This is provided a convenience in case you have windows
|
||||||
where a connection is not explicit. (#6798)
|
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]
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user