From: Ken Thomases Subject: winemac: When ClipCursor() is called redundantly, don't warp the cursor or discard mouse move events. Message-Id: <5ED776A0-0A3F-409C-8D21-0A5138D0FF0E@codeweavers.com> Date: Mon, 16 Dec 2013 19:42:22 -0600 Fixes a problem in some games which repeatedly (re)establish the same cursor clipping rect, making it exceedingly difficult to move the camera with the mouse. --- dlls/winemac.drv/cocoa_app.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/winemac.drv/cocoa_app.m b/dlls/winemac.drv/cocoa_app.m index c2f7604..d036cbd 100644 --- a/dlls/winemac.drv/cocoa_app.m +++ b/dlls/winemac.drv/cocoa_app.m @@ -1353,6 +1353,10 @@ - (BOOL) startClippingCursor:(CGRect)rect if (!cursorClippingEventTap && ![self installEventTap]) return FALSE; + if (clippingCursor && CGRectEqualToRect(rect, cursorClipRect) && + CGEventTapIsEnabled(cursorClippingEventTap)) + return TRUE; + err = CGAssociateMouseAndMouseCursorPosition(false); if (err != kCGErrorSuccess) return FALSE;