From 4dee58d480dc034d0cc188c7a7f2cc9328f5c1d1 Mon Sep 17 00:00:00 2001 From: "ryogo.yoshimura" Date: Sat, 27 May 2017 15:00:05 +0900 Subject: [PATCH] Cocoa: Fix conversion between NSPoint and CGPoint GLFW still supports versions of macOS before these became the same underlying type. Closes #1023. --- README.md | 1 + src/cocoa_window.m | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9ab9eae6..c53173d2 100644 --- a/README.md +++ b/README.md @@ -354,6 +354,7 @@ skills. - Jay Weisskopf - Frank Wille - yuriks + - Ryogo Yoshimura - Santi Zupancic - Jonas Ådahl - Lasse Öörni diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 17d2b206..2c94a8a2 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -1030,7 +1030,9 @@ static GLFWbool createNativeWindow(_GLFWwindow* window, else { [window->ns.object center]; - _glfw.ns.cascadePoint = [window->ns.object cascadeTopLeftFromPoint:_glfw.ns.cascadePoint]; + _glfw.ns.cascadePoint = + NSPointToCGPoint([window->ns.object cascadeTopLeftFromPoint: + NSPointFromCGPoint(_glfw.ns.cascadePoint)]); if (wndconfig->resizable) {