src/video/cocoa/SDL_cocoamouse.m
changeset 7106 31f8acac196b
parent 7100 ffd910de700b
child 7113 7b4b596b3cfb
     1.1 --- a/src/video/cocoa/SDL_cocoamouse.m	Wed Apr 24 12:20:44 2013 -0700
     1.2 +++ b/src/video/cocoa/SDL_cocoamouse.m	Wed Apr 24 12:20:48 2013 -0700
     1.3 @@ -187,11 +187,17 @@
     1.4  static void
     1.5  Cocoa_WarpMouse(SDL_Window * window, int x, int y)
     1.6  {
     1.7 +    SDL_Mouse *mouse = SDL_GetMouse();
     1.8      CGPoint point;
     1.9  
    1.10      point.x = (float)window->x + x;
    1.11      point.y = (float)window->y + y;
    1.12      CGWarpMouseCursorPosition(point);
    1.13 +
    1.14 +    /* CGWarpMouseCursorPosition doesn't generate a window event, unlike our
    1.15 +     * other implementations' APIs.
    1.16 +     */
    1.17 +    SDL_SendMouseMotion(mouse->focus, mouse->mouseID, 0, x, y);
    1.18  }
    1.19  
    1.20  static int