Commit 77f0a63b authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

winemac: When ClipCursor() is called redundantly, don't warp the cursor or…

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.
parent b8778854
...@@ -1353,6 +1353,10 @@ int macdrv_err_on; ...@@ -1353,6 +1353,10 @@ int macdrv_err_on;
if (!cursorClippingEventTap && ![self installEventTap]) if (!cursorClippingEventTap && ![self installEventTap])
return FALSE; return FALSE;
if (clippingCursor && CGRectEqualToRect(rect, cursorClipRect) &&
CGEventTapIsEnabled(cursorClippingEventTap))
return TRUE;
err = CGAssociateMouseAndMouseCursorPosition(false); err = CGAssociateMouseAndMouseCursorPosition(false);
if (err != kCGErrorSuccess) if (err != kCGErrorSuccess)
return FALSE; return FALSE;
......
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