src/video/cocoa/SDL_cocoawindow.m
changeset 5376 183ec2d4485c
parent 5375 16877f74123c
child 5378 738a96883fa6
--- a/src/video/cocoa/SDL_cocoawindow.m	Mon Feb 21 16:45:23 2011 -0800
+++ b/src/video/cocoa/SDL_cocoawindow.m	Mon Feb 21 17:15:50 2011 -0800
@@ -251,12 +251,19 @@
 
 - (void)mouseEntered:(NSEvent *)theEvent
 {
+    SDL_Mouse *mouse = SDL_GetMouse();
+
     SDL_SetMouseFocus(_data->window);
+
+    if (!mouse->cursor_shown) {
+        [NSCursor hide];
+    }
 }
 
 - (void)mouseExited:(NSEvent *)theEvent
 {
     SDL_Window *window = _data->window;
+    SDL_Mouse *mouse = SDL_GetMouse();
 
     if (SDL_GetMouseFocus() == window) {
         if (window->flags & SDL_WINDOW_INPUT_GRABBED) {
@@ -276,6 +283,10 @@
             SDL_SetMouseFocus(NULL);
         }
     }
+
+    if (!mouse->cursor_shown) {
+        [NSCursor unhide];
+    }
 }
 
 - (void)mouseMoved:(NSEvent *)theEvent