Ken Thomases : winemac: Hide cursor when first requested even if we don' t know it's over a window.
Alexandre Julliard
julliard at winehq.org
Fri Jan 10 14:44:53 CST 2014
Module: wine
Branch: stable
Commit: 692bd28f020a41a587842f251efa66d20994504b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=692bd28f020a41a587842f251efa66d20994504b
Author: Ken Thomases <ken at codeweavers.com>
Date: Wed Oct 30 08:07:51 2013 -0500
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.
(cherry picked from commit 6b9f81271b4b150244ed37fbda79103ba16dcbf4)
---
dlls/winemac.drv/cocoa_app.m | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/winemac.drv/cocoa_app.m b/dlls/winemac.drv/cocoa_app.m
index 1cc8d2d..ca9dcac 100644
--- a/dlls/winemac.drv/cocoa_app.m
+++ b/dlls/winemac.drv/cocoa_app.m
@@ -787,9 +787,9 @@ int macdrv_err_on;
return ([originalDisplayModes count] > 0 || displaysCapturedForFullscreen);
}
- - (void) updateCursor
+ - (void) updateCursor:(BOOL)force
{
- if (lastTargetWindow)
+ if (force || lastTargetWindow)
{
if (clientWantsCursorHidden && !cursorHidden)
{
@@ -829,7 +829,7 @@ int macdrv_err_on;
if (!clientWantsCursorHidden)
{
clientWantsCursorHidden = TRUE;
- [self updateCursor];
+ [self updateCursor:TRUE];
}
}
@@ -838,7 +838,7 @@ int macdrv_err_on;
if (clientWantsCursorHidden)
{
clientWantsCursorHidden = FALSE;
- [self updateCursor];
+ [self updateCursor:FALSE];
}
}
@@ -849,7 +849,7 @@ int macdrv_err_on;
[cursor release];
cursor = [newCursor retain];
cursorIsCurrent = FALSE;
- [self updateCursor];
+ [self updateCursor:FALSE];
}
}
@@ -1516,7 +1516,7 @@ int macdrv_err_on;
else
lastTargetWindow = nil;
- [self updateCursor];
+ [self updateCursor:FALSE];
}
- (void) handleMouseButton:(NSEvent*)theEvent
More information about the wine-cvs
mailing list