From 04abe922b7df4ba6ea0beb3da54fcabe58d0b9a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andri=20Pa=CC=81lsson?= Date: Sun, 6 Oct 2013 16:54:52 +0200 Subject: [PATCH] OSX fixed set cursor pos in HIDDEN and NORMAL mode --- src/cocoa_window.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 85dfa6363..b381211ba 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -1065,6 +1065,11 @@ void _glfwPlatformSetCursorPos(_GLFWwindow* window, double x, double y) CGWarpMouseCursorPosition(CGPointMake(globalPoint.x, transformY(globalPoint.y))); } + + if (window->cursorMode != GLFW_CURSOR_DISABLED) + { + CGAssociateMouseAndMouseCursorPosition(true); + } } void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode)