Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Plisson <damien.plisson@yahoo.fr>2010-07-09 22:54:44 +0400
committerDamien Plisson <damien.plisson@yahoo.fr>2010-07-09 22:54:44 +0400
commit6682dae779c94cf0fd2fbb8447b56dd5cc7b422e (patch)
tree6bbd40558f46f57f69b1bc3ec7ad2208c53d33d2
parent761be67d8a5741bf04df19e2846b181d54aaa550 (diff)
Fixed bug [#22555] OSX/Cocoa: Suppress delayed mouse position changed event after setting it
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.mm4
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);