src/video/cocoa/SDL_cocoamousetap.m
changeset 8005 d8edfca6e3c2
parent 7917 686df9c2b98a
child 8054 2a38ef3eeabb
     1.1 --- a/src/video/cocoa/SDL_cocoamousetap.m	Sat Nov 16 18:56:02 2013 -0800
     1.2 +++ b/src/video/cocoa/SDL_cocoamousetap.m	Sat Nov 16 21:19:16 2013 -0800
     1.3 @@ -63,6 +63,7 @@
     1.4      SDL_MouseEventTapData *tapdata = (SDL_MouseEventTapData*)refcon;
     1.5      SDL_Mouse *mouse = SDL_GetMouse();
     1.6      SDL_Window *window = SDL_GetKeyboardFocus();
     1.7 +    NSWindow *nswindow = ((SDL_WindowData *) window->driverdata)->nswindow;
     1.8      NSRect windowRect;
     1.9      CGPoint eventLocation;
    1.10  
    1.11 @@ -93,7 +94,7 @@
    1.12  
    1.13      /* This is the same coordinate system as Cocoa uses. */
    1.14      eventLocation = CGEventGetUnflippedLocation(event);
    1.15 -    windowRect = [((SDL_WindowData *) window->driverdata)->nswindow frame];
    1.16 +    windowRect = [nswindow contentRectForFrameRect:[nswindow frame]];
    1.17  
    1.18      if (!NSPointInRect(NSPointFromCGPoint(eventLocation), windowRect)) {
    1.19