From 6ef4d3aec550aaed724a2b2b91d6822853a41323 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sat, 6 Nov 2004 14:52:25 +0000 Subject: Solved annoyance in OSX warp cursor. The former used CGPostMouseEvent call behaves very unpredictable (ask google) and seems to clear pending events as well (fly mode, shift event dissappears). The now used call, CGWarpMouseCursorPosition, creates no event so it has to be combined with updating mouse cursor location in ghostwinlay.c --- intern/ghost/intern/GHOST_SystemCarbon.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'intern') diff --git a/intern/ghost/intern/GHOST_SystemCarbon.cpp b/intern/ghost/intern/GHOST_SystemCarbon.cpp index e7f087a86bc..83ba2fdf764 100644 --- a/intern/ghost/intern/GHOST_SystemCarbon.cpp +++ b/intern/ghost/intern/GHOST_SystemCarbon.cpp @@ -493,7 +493,9 @@ GHOST_TSuccess GHOST_SystemCarbon::setCursorPosition(GHOST_TInt32 x, GHOST_TInt3 { float xf=(float)x, yf=(float)y; - CGPostMouseEvent(CGPointMake(xf, yf), TRUE, 1, FALSE, 0); + CGWarpMouseCursorPosition(CGPointMake(xf, yf)); + // this call below sends event, but empties other events (like shift) + // CGPostMouseEvent(CGPointMake(xf, yf), TRUE, 1, FALSE, 0); return GHOST_kSuccess; } -- cgit v1.2.3