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