src/video/cocoa/SDL_cocoamousetap.m
changeset 8054 2a38ef3eeabb
parent 8005 d8edfca6e3c2
child 8093 b43765095a6f
     1.1 --- a/src/video/cocoa/SDL_cocoamousetap.m	Fri Dec 06 09:13:31 2013 -0800
     1.2 +++ b/src/video/cocoa/SDL_cocoamousetap.m	Fri Dec 06 16:12:18 2013 -0800
     1.3 @@ -63,7 +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 +    NSWindow *nswindow;
     1.9      NSRect windowRect;
    1.10      CGPoint eventLocation;
    1.11  
    1.12 @@ -93,6 +93,7 @@
    1.13      }
    1.14  
    1.15      /* This is the same coordinate system as Cocoa uses. */
    1.16 +    nswindow = ((SDL_WindowData *) window->driverdata)->nswindow;
    1.17      eventLocation = CGEventGetUnflippedLocation(event);
    1.18      windowRect = [nswindow contentRectForFrameRect:[nswindow frame]];
    1.19