src/video/cocoa/SDL_cocoamouse.m
changeset 7464 7cdeb64faa72
parent 7271 963d2ba35cfe
child 7465 1bcf7aac5623
equal deleted inserted replaced
7463:f2f794cf85c0 7464:7cdeb64faa72
   199 
   199 
   200 static void
   200 static void
   201 Cocoa_WarpMouse(SDL_Window * window, int x, int y)
   201 Cocoa_WarpMouse(SDL_Window * window, int x, int y)
   202 {
   202 {
   203     SDL_Mouse *mouse = SDL_GetMouse();
   203     SDL_Mouse *mouse = SDL_GetMouse();
   204     CGPoint point;
   204     CGPoint point = CGMakePoint(x, y);
   205 
   205 
   206     point.x = (float)window->x + x;
   206     if (!(window->flags & SDL_WINDOW_FULLSCREEN))
   207     point.y = (float)window->y + y;
   207     {
       
   208         point.x += window->x;
       
   209         point.y += window->y;
       
   210     }
   208 
   211 
   209     {
   212     {
   210         /* This makes Cocoa_HandleMouseEvent ignore this delta in the next
   213         /* This makes Cocoa_HandleMouseEvent ignore this delta in the next
   211          * movement event.
   214          * movement event.
   212          */
   215          */