src/video/cocoa/SDL_cocoamouse.m
changeset 7113 7b4b596b3cfb
parent 7106 31f8acac196b
child 7114 02b2fe147478
equal deleted inserted replaced
7112:a1a723edea64 7113:7b4b596b3cfb
   190     SDL_Mouse *mouse = SDL_GetMouse();
   190     SDL_Mouse *mouse = SDL_GetMouse();
   191     CGPoint point;
   191     CGPoint point;
   192 
   192 
   193     point.x = (float)window->x + x;
   193     point.x = (float)window->x + x;
   194     point.y = (float)window->y + y;
   194     point.y = (float)window->y + y;
       
   195 
       
   196     /* According to the docs, this was deprecated in 10.6, but it's still
       
   197      * around. The substitute requires a CGEventSource, but I'm not entirely
       
   198      * sure how we'd procure the right one for this event.
       
   199      */
       
   200     CGSetLocalEventsSuppressionInterval(0.0);
   195     CGWarpMouseCursorPosition(point);
   201     CGWarpMouseCursorPosition(point);
       
   202     CGSetLocalEventsSuppressionInterval(0.25);
   196 
   203 
   197     /* CGWarpMouseCursorPosition doesn't generate a window event, unlike our
   204     /* CGWarpMouseCursorPosition doesn't generate a window event, unlike our
   198      * other implementations' APIs.
   205      * other implementations' APIs.
   199      */
   206      */
   200     SDL_SendMouseMotion(mouse->focus, mouse->mouseID, 0, x, y);
   207     SDL_SendMouseMotion(mouse->focus, mouse->mouseID, 0, x, y);