src/video/cocoa/SDL_cocoawindow.m
changeset 3508 a12068b6f44f
parent 3507 3712547eac4f
child 3509 8fde6aeb58df
     1.1 --- a/src/video/cocoa/SDL_cocoawindow.m	Tue Dec 01 12:08:34 2009 +0000
     1.2 +++ b/src/video/cocoa/SDL_cocoawindow.m	Wed Dec 02 06:10:18 2009 +0000
     1.3 @@ -232,17 +232,16 @@
     1.4      int index;
     1.5      SDL_Mouse *mouse;
     1.6      NSPoint point;
     1.7 -    NSRect rect;
     1.8  
     1.9      index = _data->videodata->mouse;
    1.10      mouse = SDL_GetMouse(index);
    1.11  
    1.12      point = [NSEvent mouseLocation];
    1.13      if ( (window->flags & SDL_WINDOW_FULLSCREEN) ) {
    1.14 -        rect.size.width = CGDisplayPixelsWide(kCGDirectMainDisplay);
    1.15 -        rect.size.height = CGDisplayPixelsHigh(kCGDirectMainDisplay);
    1.16 +        NSRect rect = CGDisplayBounds(_data->display);
    1.17 +
    1.18          point.x = point.x - rect.origin.x;
    1.19 -        point.y = rect.size.height - point.y;
    1.20 +        point.y = CGDisplayPixelsHigh(kCGDirectMainDisplay) - point.y - rect.origin.y;
    1.21      } else {
    1.22          point.x -= window->x;
    1.23          point.y = CGDisplayPixelsHigh(kCGDirectMainDisplay) - point.y - window->y;