From 89692064503ccfbb66374a42d63401a96511501f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 9 Apr 2019 22:02:36 +0530 Subject: [PATCH] macOS: Fix cocoa mouse y-coord off by one See https://github.com/glfw/glfw/issues/1461 --- glfw/cocoa_window.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m index 772f9decc..2444e8d5b 100644 --- a/glfw/cocoa_window.m +++ b/glfw/cocoa_window.m @@ -657,7 +657,7 @@ static GLFWapplicationshouldhandlereopenfun handle_reopen_callback = NULL; const NSRect contentRect = [window->ns.view frame]; const NSPoint pos = [event locationInWindow]; - _glfwInputCursorPos(window, pos.x, contentRect.size.height - pos.y); + _glfwInputCursorPos(window, pos.x, contentRect.size.height - pos.y - 1); } window->ns.cursorWarpDeltaX = 0;