Backends: OSX: fixed ImGui_ImplOSX_GetWindowSize and ConvertNSRect. (#6009)

This commit is contained in:
Mikko Sivulainen 2022-12-21 14:08:26 +02:00 committed by ocornut
parent 90de839445
commit 16aaf60697
2 changed files with 7 additions and 2 deletions

View File

@ -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)

View File

@ -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)