From 2ac8da74659005be130882318e5baa31c1f7b655 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Sun, 22 Apr 2012 12:58:05 +0200 Subject: [PATCH] Merged patch #3519669. --- src/cocoa_window.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;