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.
This commit is contained in:
Ken Thomases 2013-10-30 08:07:51 -05:00 committed by Alexandre Julliard
parent 2f68e47167
commit 6b9f81271b
1 changed files with 6 additions and 6 deletions

View File

@ -787,9 +787,9 @@ - (BOOL) areDisplaysCaptured
return ([originalDisplayModes count] > 0 || displaysCapturedForFullscreen);
}
- (void) updateCursor
- (void) updateCursor:(BOOL)force
{
if (lastTargetWindow)
if (force || lastTargetWindow)
{
if (clientWantsCursorHidden && !cursorHidden)
{
@ -829,7 +829,7 @@ - (void) hideCursor
if (!clientWantsCursorHidden)
{
clientWantsCursorHidden = TRUE;
[self updateCursor];
[self updateCursor:TRUE];
}
}
@ -838,7 +838,7 @@ - (void) unhideCursor
if (clientWantsCursorHidden)
{
clientWantsCursorHidden = FALSE;
[self updateCursor];
[self updateCursor:FALSE];
}
}
@ -849,7 +849,7 @@ - (void) setCursor:(NSCursor*)newCursor
[cursor release];
cursor = [newCursor retain];
cursorIsCurrent = FALSE;
[self updateCursor];
[self updateCursor:FALSE];
}
}
@ -1516,7 +1516,7 @@ - (void) handleMouseMove:(NSEvent*)anEvent
else
lastTargetWindow = nil;
[self updateCursor];
[self updateCursor:FALSE];
}
- (void) handleMouseButton:(NSEvent*)theEvent