Module: wine Branch: master Commit: 77f0a63b4fce90e4a35393eb16468f11a922ea3a URL: http://source.winehq.org/git/wine.git/?a=commit;h=77f0a63b4fce90e4a35393eb16...
Author: Ken Thomases ken@codeweavers.com Date: Mon Dec 16 19:42:22 2013 -0600
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 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/dlls/winemac.drv/cocoa_app.m b/dlls/winemac.drv/cocoa_app.m index ce43e27..c31bceb 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;