src/video/cocoa/SDL_cocoawindow.m
changeset 3509 8fde6aeb58df
parent 3508 a12068b6f44f
child 3517 e7eec78e4b92
equal deleted inserted replaced
3508:a12068b6f44f 3509:8fde6aeb58df
   241         NSRect rect = CGDisplayBounds(_data->display);
   241         NSRect rect = CGDisplayBounds(_data->display);
   242 
   242 
   243         point.x = point.x - rect.origin.x;
   243         point.x = point.x - rect.origin.x;
   244         point.y = CGDisplayPixelsHigh(kCGDirectMainDisplay) - point.y - rect.origin.y;
   244         point.y = CGDisplayPixelsHigh(kCGDirectMainDisplay) - point.y - rect.origin.y;
   245     } else {
   245     } else {
   246         point.x -= window->x;
   246         point.x = point.x - window->x;
   247         point.y = CGDisplayPixelsHigh(kCGDirectMainDisplay) - point.y - window->y;
   247         point.y = CGDisplayPixelsHigh(kCGDirectMainDisplay) - point.y - window->y;
   248     }
   248     }
   249     if ( point.x < 0 || point.x >= window->w ||
   249     if ( point.x < 0 || point.x >= window->w ||
   250          point.y < 0 || point.y >= window->h ) {
   250          point.y < 0 || point.y >= window->h ) {
   251         if (mouse->focus != 0) {
   251         if (mouse->focus != 0) {