Commit a6722029 authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

winemac: Work around mouse "pausing" after CGWarpMouseCursorPosition().

parent fa5c708c
......@@ -1049,7 +1049,20 @@ int macdrv_err_on;
{
ret = (CGWarpMouseCursorPosition(pos) == kCGErrorSuccess);
if (ret)
{
lastSetCursorPositionTime = [[NSProcessInfo processInfo] systemUptime];
// Annoyingly, CGWarpMouseCursorPosition() effectively disassociates
// the mouse from the cursor position for 0.25 seconds. This means
// that mouse movement during that interval doesn't move the cursor
// and events carry a constant location (the warped-to position)
// even though they have delta values. This screws us up because
// the accumulated deltas we send to Wine don't match any eventual
// absolute position we send (like with a button press). We can
// work around this by simply forcibly reassociating the mouse and
// cursor position.
CGAssociateMouseAndMouseCursorPosition(true);
}
}
if (ret)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment