src/video/cocoa/SDL_cocoawindow.m
changeset 9685 525f13ccf27f
parent 9679 7fc4a8be47a8
child 9790 d968c87f2a5d
     1.1 --- a/src/video/cocoa/SDL_cocoawindow.m	Fri May 29 22:24:38 2015 +0200
     1.2 +++ b/src/video/cocoa/SDL_cocoawindow.m	Sun May 31 00:50:30 2015 -0400
     1.3 @@ -751,6 +751,14 @@
     1.4  {
     1.5      int button;
     1.6  
     1.7 +    /* Ignore events that aren't inside the client area (i.e. title bar.) */
     1.8 +    if ([theEvent window]) {
     1.9 +        const NSRect windowRect = [[[theEvent window] contentView] frame];
    1.10 +        if (!NSPointInRect([theEvent locationInWindow], windowRect)) {
    1.11 +            return;
    1.12 +        }
    1.13 +    }
    1.14 +
    1.15      if ([self processHitTest:theEvent]) {
    1.16          return;  /* dragging, drop event. */
    1.17      }