src/video/cocoa/SDL_cocoawindow.m
changeset 3414 1e45c3012a4f
parent 3409 c8f580ebc96a
child 3506 e829b6098435
     1.1 --- a/src/video/cocoa/SDL_cocoawindow.m	Fri Oct 23 03:58:23 2009 +0000
     1.2 +++ b/src/video/cocoa/SDL_cocoawindow.m	Fri Oct 23 04:08:32 2009 +0000
     1.3 @@ -233,7 +233,7 @@
     1.4      int index;
     1.5      SDL_Mouse *mouse;
     1.6      NSPoint point;
     1.7 -    NSRect rect = [_data->window contentRectForFrameRect:[_data->window frame]];
     1.8 +    NSRect rect;
     1.9  
    1.10      index = _data->videodata->mouse;
    1.11      mouse = SDL_GetMouse(index);
    1.12 @@ -242,14 +242,12 @@
    1.13      if ( (window->flags & SDL_WINDOW_FULLSCREEN) ) {
    1.14          rect.size.width = CGDisplayPixelsWide(kCGDirectMainDisplay);
    1.15          rect.size.height = CGDisplayPixelsHigh(kCGDirectMainDisplay);
    1.16 +        point.x = point.x - rect.origin.x;
    1.17          point.y = rect.size.height - point.y;
    1.18      } else {
    1.19          rect = [_data->window contentRectForFrameRect:[_data->window frame]];
    1.20 -        point.x = point.x - rect.origin.x;
    1.21          point.y = rect.size.height - (point.y - rect.origin.y);
    1.22      }
    1.23 -    point.x = point.x - rect.origin.x;
    1.24 -    point.y = rect.size.height - (point.y - rect.origin.y);
    1.25      if ( point.x < 0 || point.x >= rect.size.width ||
    1.26           point.y < 0 || point.y >= rect.size.height ) {
    1.27          if (mouse->focus != 0) {