summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-10-03 18:43:44 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-10-03 18:44:11 +0300
commit88993e95e5ff9fecc5980b25e1778053ca23afe0 (patch)
tree9379ad0192ac1617ad7b0f4e14a5d627b8f25501
parentc3d37b67f2926787b2499be64fb6f914b917d2ed (diff)
macOS: Compatibility with macOS 10.12 APIs
IssueID #343
-rw-r--r--src/macos.m3
1 files changed, 2 insertions, 1 deletions
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
664 } 664 }
665 windowCoord.y = window->size.y - windowCoord.y; 665 windowCoord.y = window->size.y - windowCoord.y;
666 windowCoord = divf_I2(windowCoord, window->pixelRatio); 666 windowCoord = divf_I2(windowCoord, window->pixelRatio);
667 NSPoint screenPoint = [nsWindow convertPointToScreen:(CGPoint){ windowCoord.x, windowCoord.y }]; 667 NSPoint screenPoint = [nsWindow convertRectToScreen:(CGRect){ { windowCoord.x, windowCoord.y },
668 { 0, 0 } }].origin;
668 NSMenuItem *selectedItem = makeMenuItems_(menu, menuCommands, items, n); 669 NSMenuItem *selectedItem = makeMenuItems_(menu, menuCommands, items, n);
669 [menuCommands setSource:source]; 670 [menuCommands setSource:source];
670 if (isCentered) { 671 if (isCentered) {