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
This commit is contained in:
Ton Roosendaal
2004-11-06 14:52:25 +00:00
parent cf407da719
commit 6ef4d3aec5

View File

@@ -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;
}