src/video/quartz/SDL_QuartzEvents.m
changeset 615 7ec821f3cbd0
parent 563 04dcaf3da918
child 619 bf816ce70144
--- a/src/video/quartz/SDL_QuartzEvents.m	Sun Apr 20 05:36:52 2003 +0000
+++ b/src/video/quartz/SDL_QuartzEvents.m	Sun Apr 20 05:41:16 2003 +0000
@@ -301,9 +301,10 @@
 {
     in_foreground = YES;
     
-    /* Hide the mouse cursor if was hidden */
-    if (!cursor_visible) {
+    /* Hide the cursor if it was hidden by SDL_ShowCursor() */
+    if (!cursor_visible && !cursor_hidden) {
         HideCursor ();
+        cursor_hidden = YES;
     }
 
     /* Regrab input, only if it was previously grabbed */
@@ -330,8 +331,11 @@
     /* Reassociate mouse and cursor */
     CGAssociateMouseAndMouseCursorPosition (1);
 
-    /* Show the cursor */
-    ShowCursor ();
+    /* Show the cursor if it was hidden by SDL_ShowCursor() */
+    if (!cursor_visible && cursor_hidden) {
+        ShowCursor ();
+        cursor_hidden = NO;
+    }
 
     SDL_PrivateAppActive (0, SDL_APPINPUTFOCUS);
 }