src/video/cocoa/SDL_cocoawindow.m
changeset 7113 7b4b596b3cfb
parent 7098 f4b2c6fb0258
child 7158 ff52fba70795
     1.1 --- a/src/video/cocoa/SDL_cocoawindow.m	Thu Apr 25 18:40:31 2013 -0700
     1.2 +++ b/src/video/cocoa/SDL_cocoawindow.m	Thu Apr 25 18:40:22 2013 -0700
     1.3 @@ -393,13 +393,13 @@
     1.4              cgpoint.x = window->x + x;
     1.5              cgpoint.y = window->y + y;
     1.6  
     1.7 -            /* We have to disassociate the curosr & the mouse before issuing
     1.8 -             * this cursor warp, otherwise it gets limited to one update per
     1.9 -             * 250ms, and looks very choppy.
    1.10 +            /* According to the docs, this was deprecated in 10.6, but it's still
    1.11 +             * around. The substitute requires a CGEventSource, but I'm not entirely
    1.12 +             * sure how we'd procure the right one for this event.
    1.13               */
    1.14 -            CGAssociateMouseAndMouseCursorPosition(NO);
    1.15 +            CGSetLocalEventsSuppressionInterval(0.0);
    1.16              CGDisplayMoveCursorToPoint(kCGDirectMainDisplay, cgpoint);
    1.17 -            CGAssociateMouseAndMouseCursorPosition(YES);
    1.18 +            CGSetLocalEventsSuppressionInterval(0.25);
    1.19          }
    1.20      }
    1.21      SDL_SendMouseMotion(window, 0, 0, x, y);