src/video/cocoa/SDL_cocoawindow.m
changeset 9983 bbe9ef8c2ecb
parent 9973 4d8a561cf978
child 9998 f67cf37e9cd4
     1.1 --- a/src/video/cocoa/SDL_cocoawindow.m	Tue Dec 29 00:57:24 2015 -0500
     1.2 +++ b/src/video/cocoa/SDL_cocoawindow.m	Tue Dec 29 01:09:58 2015 -0500
     1.3 @@ -823,7 +823,14 @@
     1.4  
     1.5      /* Ignore events that aren't inside the client area (i.e. title bar.) */
     1.6      if ([theEvent window]) {
     1.7 -        const NSRect windowRect = [[[theEvent window] contentView] frame];
     1.8 +        NSRect windowRect = [[[theEvent window] contentView] frame];
     1.9 +
    1.10 +        /* add one to size, since NSPointInRect is exclusive of the bottom
    1.11 +           edges, which mean it misses the top of the window by one pixel
    1.12 +           (as the origin is the bottom left). */
    1.13 +        windowRect.size.width += 1;
    1.14 +        windowRect.size.height += 1;
    1.15 +
    1.16          if (!NSPointInRect([theEvent locationInWindow], windowRect)) {
    1.17              return;
    1.18          }