src/video/cocoa/SDL_cocoamouse.m
changeset 7464 7cdeb64faa72
parent 7271 963d2ba35cfe
child 7465 1bcf7aac5623
     1.1 --- a/src/video/cocoa/SDL_cocoamouse.m	Mon Jul 15 14:38:19 2013 -0400
     1.2 +++ b/src/video/cocoa/SDL_cocoamouse.m	Mon Jul 15 11:57:18 2013 -0700
     1.3 @@ -201,10 +201,13 @@
     1.4  Cocoa_WarpMouse(SDL_Window * window, int x, int y)
     1.5  {
     1.6      SDL_Mouse *mouse = SDL_GetMouse();
     1.7 -    CGPoint point;
     1.8 +    CGPoint point = CGMakePoint(x, y);
     1.9  
    1.10 -    point.x = (float)window->x + x;
    1.11 -    point.y = (float)window->y + y;
    1.12 +    if (!(window->flags & SDL_WINDOW_FULLSCREEN))
    1.13 +    {
    1.14 +        point.x += window->x;
    1.15 +        point.y += window->y;
    1.16 +    }
    1.17  
    1.18      {
    1.19          /* This makes Cocoa_HandleMouseEvent ignore this delta in the next