Commit 6b9f8127 authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

winemac: Hide cursor when first requested even if we don't know it's over a window.

The tracking of whether it is over a window or not is only updated when the mouse moves. If a window was created or moved under it, then the state can be stale. That caused us to defer hiding the cursor until the mouse was moved. This happens at the start of games pretty often.
parent 2f68e471
...@@ -787,9 +787,9 @@ int macdrv_err_on; ...@@ -787,9 +787,9 @@ int macdrv_err_on;
return ([originalDisplayModes count] > 0 || displaysCapturedForFullscreen); return ([originalDisplayModes count] > 0 || displaysCapturedForFullscreen);
} }
- (void) updateCursor - (void) updateCursor:(BOOL)force
{ {
if (lastTargetWindow) if (force || lastTargetWindow)
{ {
if (clientWantsCursorHidden && !cursorHidden) if (clientWantsCursorHidden && !cursorHidden)
{ {
...@@ -829,7 +829,7 @@ int macdrv_err_on; ...@@ -829,7 +829,7 @@ int macdrv_err_on;
if (!clientWantsCursorHidden) if (!clientWantsCursorHidden)
{ {
clientWantsCursorHidden = TRUE; clientWantsCursorHidden = TRUE;
[self updateCursor]; [self updateCursor:TRUE];
} }
} }
...@@ -838,7 +838,7 @@ int macdrv_err_on; ...@@ -838,7 +838,7 @@ int macdrv_err_on;
if (clientWantsCursorHidden) if (clientWantsCursorHidden)
{ {
clientWantsCursorHidden = FALSE; clientWantsCursorHidden = FALSE;
[self updateCursor]; [self updateCursor:FALSE];
} }
} }
...@@ -849,7 +849,7 @@ int macdrv_err_on; ...@@ -849,7 +849,7 @@ int macdrv_err_on;
[cursor release]; [cursor release];
cursor = [newCursor retain]; cursor = [newCursor retain];
cursorIsCurrent = FALSE; cursorIsCurrent = FALSE;
[self updateCursor]; [self updateCursor:FALSE];
} }
} }
...@@ -1516,7 +1516,7 @@ int macdrv_err_on; ...@@ -1516,7 +1516,7 @@ int macdrv_err_on;
else else
lastTargetWindow = nil; lastTargetWindow = nil;
[self updateCursor]; [self updateCursor:FALSE];
} }
- (void) handleMouseButton:(NSEvent*)theEvent - (void) handleMouseButton:(NSEvent*)theEvent
......
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