From 88993e95e5ff9fecc5980b25e1778053ca23afe0 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sun, 3 Oct 2021 18:43:44 +0300 Subject: macOS: Compatibility with macOS 10.12 APIs IssueID #343 --- src/macos.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/macos.m b/src/macos.m index 54ca0e07..d737e9e8 100644 --- a/src/macos.m +++ b/src/macos.m @@ -664,7 +664,8 @@ void showPopupMenu_MacOS(iWidget *source, iInt2 windowCoord, const iMenuItem *it } windowCoord.y = window->size.y - windowCoord.y; windowCoord = divf_I2(windowCoord, window->pixelRatio); - NSPoint screenPoint = [nsWindow convertPointToScreen:(CGPoint){ windowCoord.x, windowCoord.y }]; + NSPoint screenPoint = [nsWindow convertRectToScreen:(CGRect){ { windowCoord.x, windowCoord.y }, + { 0, 0 } }].origin; NSMenuItem *selectedItem = makeMenuItems_(menu, menuCommands, items, n); [menuCommands setSource:source]; if (isCentered) { -- cgit v1.2.3