src/video/cocoa/SDL_cocoamouse.m
changeset 7271 963d2ba35cfe
parent 7191 75360622e65f
child 7464 7cdeb64faa72
--- a/src/video/cocoa/SDL_cocoamouse.m	Tue Jun 04 13:53:55 2013 -0700
+++ b/src/video/cocoa/SDL_cocoamouse.m	Tue Jun 04 14:54:49 2013 -0700
@@ -224,10 +224,12 @@
     CGWarpMouseCursorPosition(point);
     CGSetLocalEventsSuppressionInterval(0.25);
 
-    /* CGWarpMouseCursorPosition doesn't generate a window event, unlike our
-     * other implementations' APIs.
-     */
-    SDL_SendMouseMotion(mouse->focus, mouse->mouseID, 0, x, y);
+    if (!mouse->relative_mode) {
+        /* CGWarpMouseCursorPosition doesn't generate a window event, unlike our
+         * other implementations' APIs.
+         */
+        SDL_SendMouseMotion(mouse->focus, mouse->mouseID, 0, x, y);
+    }
 }
 
 static int