src/video/cocoa/SDL_cocoawindow.m
changeset 10158 941261e0db9f
parent 10140 6dd5f49e4a77
child 10159 d41acf6379f6
equal deleted inserted replaced
10157:6ad89111cb4f 10158:941261e0db9f
   972              */
   972              */
   973 
   973 
   974             cgpoint.x = window->x + x;
   974             cgpoint.x = window->x + x;
   975             cgpoint.y = window->y + y;
   975             cgpoint.y = window->y + y;
   976 
   976 
   977             /* According to the docs, this was deprecated in 10.6, but it's still
       
   978              * around. The substitute requires a CGEventSource, but I'm not entirely
       
   979              * sure how we'd procure the right one for this event.
       
   980              */
       
   981             CGSetLocalEventsSuppressionInterval(0.0);
       
   982             CGDisplayMoveCursorToPoint(kCGDirectMainDisplay, cgpoint);
   977             CGDisplayMoveCursorToPoint(kCGDirectMainDisplay, cgpoint);
   983             CGSetLocalEventsSuppressionInterval(0.25);
   978             CGAssociateMouseAndMouseCursorPosition(YES);
   984 
   979 
   985             Cocoa_HandleMouseWarp(cgpoint.x, cgpoint.y);
   980             Cocoa_HandleMouseWarp(cgpoint.x, cgpoint.y);
   986 #endif
   981 #endif
   987         }
   982         }
   988     }
   983     }