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
Wed Oct 30 13:11:04 CDT 2013


Module: wine
Branch: master
Commit: 6b9f81271b4b150244ed37fbda79103ba16dcbf4
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6b9f81271b4b150244ed37fbda79103ba16dcbf4

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.

---

 dlls/winemac.drv/cocoa_app.m |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/winemac.drv/cocoa_app.m b/dlls/winemac.drv/cocoa_app.m
index e888a50..f351f33 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