diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 9e64b2d3..b5231ec9 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -1168,7 +1168,7 @@ void _glfwPlatformSetMouseCursorPos(_GLFWwindow* window, int x, int y) // calculating the maximum y coordinate of all screens, since Cocoa's // "global coordinates" are upside down from CG's... - NSPoint localPoint = NSMakePoint(x, y); + NSPoint localPoint = NSMakePoint(x, window->height - y); NSPoint globalPoint = [window->NS.object convertBaseToScreen:localPoint]; CGPoint mainScreenOrigin = CGDisplayBounds(CGMainDisplayID()).origin; double mainScreenHeight = CGDisplayBounds(CGMainDisplayID()).size.height;