src/video/cocoa/SDL_cocoawindow.m
changeset 7593 20298a0d8631
parent 7566 b14d00c30095
child 7594 6abcf951af68
equal deleted inserted replaced
7592:063a932a264f 7593:20298a0d8631
   412                 y = 0;
   412                 y = 0;
   413             } else if (y >= window->h) {
   413             } else if (y >= window->h) {
   414                 y = window->h - 1;
   414                 y = window->h - 1;
   415             }
   415             }
   416 
   416 
       
   417 #if !SDL_MAC_NO_SANDBOX
       
   418             /* When SDL_MAC_NO_SANDBOX is set, this is handled by
       
   419              * SDL_cocoamousetap.m.
       
   420              */
       
   421 
   417             cgpoint.x = window->x + x;
   422             cgpoint.x = window->x + x;
   418             cgpoint.y = window->y + y;
   423             cgpoint.y = window->y + y;
   419 
   424 
   420             /* According to the docs, this was deprecated in 10.6, but it's still
   425             /* According to the docs, this was deprecated in 10.6, but it's still
   421              * around. The substitute requires a CGEventSource, but I'm not entirely
   426              * around. The substitute requires a CGEventSource, but I'm not entirely
   422              * sure how we'd procure the right one for this event.
   427              * sure how we'd procure the right one for this event.
   423              */
   428              */
   424             CGSetLocalEventsSuppressionInterval(0.0);
   429             CGSetLocalEventsSuppressionInterval(0.0);
   425             CGDisplayMoveCursorToPoint(kCGDirectMainDisplay, cgpoint);
   430             CGDisplayMoveCursorToPoint(kCGDirectMainDisplay, cgpoint);
   426             CGSetLocalEventsSuppressionInterval(0.25);
   431             CGSetLocalEventsSuppressionInterval(0.25);
       
   432 #endif
   427         }
   433         }
   428     }
   434     }
   429     SDL_SendMouseMotion(window, 0, 0, x, y);
   435     SDL_SendMouseMotion(window, 0, 0, x, y);
   430 }
   436 }
   431 
   437