src/video/cocoa/SDL_cocoamouse.m
changeset 7271 963d2ba35cfe
parent 7191 75360622e65f
child 7464 7cdeb64faa72
equal deleted inserted replaced
7270:76df5476a6ce 7271:963d2ba35cfe
   222      */
   222      */
   223     CGSetLocalEventsSuppressionInterval(0.0);
   223     CGSetLocalEventsSuppressionInterval(0.0);
   224     CGWarpMouseCursorPosition(point);
   224     CGWarpMouseCursorPosition(point);
   225     CGSetLocalEventsSuppressionInterval(0.25);
   225     CGSetLocalEventsSuppressionInterval(0.25);
   226 
   226 
   227     /* CGWarpMouseCursorPosition doesn't generate a window event, unlike our
   227     if (!mouse->relative_mode) {
   228      * other implementations' APIs.
   228         /* CGWarpMouseCursorPosition doesn't generate a window event, unlike our
   229      */
   229          * other implementations' APIs.
   230     SDL_SendMouseMotion(mouse->focus, mouse->mouseID, 0, x, y);
   230          */
       
   231         SDL_SendMouseMotion(mouse->focus, mouse->mouseID, 0, x, y);
       
   232     }
   231 }
   233 }
   232 
   234 
   233 static int
   235 static int
   234 Cocoa_SetRelativeMouseMode(SDL_bool enabled)
   236 Cocoa_SetRelativeMouseMode(SDL_bool enabled)
   235 {
   237 {