From 6682dae779c94cf0fd2fbb8447b56dd5cc7b422e Mon Sep 17 00:00:00 2001 From: Damien Plisson Date: Fri, 9 Jul 2010 18:54:44 +0000 Subject: Fixed bug [#22555] OSX/Cocoa: Suppress delayed mouse position changed event after setting it --- intern/ghost/intern/GHOST_SystemCocoa.mm | 4 ++++ 1 file changed, 4 insertions(+) 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); -- cgit v1.2.3