src/video/cocoa/SDL_cocoawindow.m
changeset 3517 e7eec78e4b92
parent 3509 8fde6aeb58df
child 3525 455a6c47d2c6
     1.1 --- a/src/video/cocoa/SDL_cocoawindow.m	Thu Dec 03 05:05:26 2009 +0000
     1.2 +++ b/src/video/cocoa/SDL_cocoawindow.m	Thu Dec 03 08:33:39 2009 +0000
     1.3 @@ -235,17 +235,8 @@
     1.4  
     1.5      index = _data->videodata->mouse;
     1.6      mouse = SDL_GetMouse(index);
     1.7 -
     1.8 -    point = [NSEvent mouseLocation];
     1.9 -    if ( (window->flags & SDL_WINDOW_FULLSCREEN) ) {
    1.10 -        NSRect rect = CGDisplayBounds(_data->display);
    1.11 -
    1.12 -        point.x = point.x - rect.origin.x;
    1.13 -        point.y = CGDisplayPixelsHigh(kCGDirectMainDisplay) - point.y - rect.origin.y;
    1.14 -    } else {
    1.15 -        point.x = point.x - window->x;
    1.16 -        point.y = CGDisplayPixelsHigh(kCGDirectMainDisplay) - point.y - window->y;
    1.17 -    }
    1.18 +    point = [theEvent locationInWindow];
    1.19 +    point.y = window->h - point.y;
    1.20      if ( point.x < 0 || point.x >= window->w ||
    1.21           point.y < 0 || point.y >= window->h ) {
    1.22          if (mouse->focus != 0) {