diff --git a/backends/imgui_impl_osx.mm b/backends/imgui_impl_osx.mm index 8ca5d323c..8b06d5afe 100644 --- a/backends/imgui_impl_osx.mm +++ b/backends/imgui_impl_osx.mm @@ -816,7 +816,7 @@ struct ImGuiViewportDataOSX static void ConvertNSRect(NSScreen* screen, NSRect* r) { - r->origin.y = CGDisplayPixelsHigh(kCGDirectMainDisplay) - r->origin.y - r->size.height; + r->origin.y = screen.frame.size.height - r->origin.y - r->size.height; } static void ImGui_ImplOSX_CreateWindow(ImGuiViewport* viewport) @@ -924,7 +924,7 @@ static ImVec2 ImGui_ImplOSX_GetWindowSize(ImGuiViewport* viewport) NSWindow* window = data->Window; NSSize size = window.contentLayoutRect.size; - return ImVec2(size.width, size.width); + return ImVec2(size.width, size.height); } static void ImGui_ImplOSX_SetWindowSize(ImGuiViewport* viewport, ImVec2 size) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 991dd5552..f66e16e87 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -144,6 +144,11 @@ Other changes: - Misc: fixed compile-time detection of SSE features on MSVC 32-bits builds. (#5943) [@TheMostDiligent] - Backends: Allegro5: restoring using al_draw_indexed_prim() when Allegro version is >= 5.2.5. (#5937) [@Espyo] +Docking+Viewports Branch: + +- Backends: OSX: fixed typo in ImGui_ImplOSX_GetWindowSize that would cause issues when resiing + from OS decorations, if they are enabled on secondary viewports. (#6009) [@sivu] + ----------------------------------------------------------------------- VERSION 1.89.1 (Released 2022-11-24)