diff options
-rw-r--r-- | intern/ghost/intern/GHOST_SystemCocoa.mm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index f65d4e93d59..6c29b7411fc 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -813,7 +813,11 @@ GHOST_TSuccess GHOST_SystemCocoa::setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 GHOST_WindowCocoa* window = (GHOST_WindowCocoa*)m_windowManager->getActiveWindow(); if (!window) return GHOST_kFailure; + //Cursor and mouse dissociation placed here not to interfere with continuous grab + // (in cont. grab setMouseCursorPosition is directly called) + CGAssociateMouseAndMouseCursorPosition(false); setMouseCursorPosition(x, y); + CGAssociateMouseAndMouseCursorPosition(true); //Force mouse move event (not pushed by Cocoa) window->screenToClient(x, y, wx, wy); |