From 77f0a63b4fce90e4a35393eb16468f11a922ea3a Mon Sep 17 00:00:00 2001 From: Ken Thomases Date: Mon, 16 Dec 2013 19:42:22 -0600 Subject: [PATCH] winemac: When ClipCursor() is called redundantly, don't warp the cursor or discard mouse move events. 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 ce43e277cad..c31bceba90a 100644 --- a/dlls/winemac.drv/cocoa_app.m +++ b/dlls/winemac.drv/cocoa_app.m @@ -1353,6 +1353,10 @@ int macdrv_err_on; if (!cursorClippingEventTap && ![self installEventTap]) return FALSE; + if (clippingCursor && CGRectEqualToRect(rect, cursorClipRect) && + CGEventTapIsEnabled(cursorClippingEventTap)) + return TRUE; + err = CGAssociateMouseAndMouseCursorPosition(false); if (err != kCGErrorSuccess) return FALSE; -- 2.11.4.GIT