src/video/cocoa/SDL_cocoamouse.m
changeset 10159 d41acf6379f6
parent 10122 f0645cd8fd39
child 10365 7f3be5258f80
     1.1 --- a/src/video/cocoa/SDL_cocoamouse.m	Sun May 01 19:51:10 2016 -0300
     1.2 +++ b/src/video/cocoa/SDL_cocoamouse.m	Sun May 01 21:41:30 2016 -0300
     1.3 @@ -316,7 +316,7 @@
     1.4  
     1.5      for (NSScreen *screen in [NSScreen screens]) {
     1.6          NSRect frame = [screen frame];
     1.7 -        if (NSPointInRect(cocoaLocation, frame)) {
     1.8 +        if (NSMouseInRect(cocoaLocation, frame, NO)) {
     1.9              *x = (int) cocoaLocation.x;
    1.10              *y = (int) ((frame.origin.y + frame.size.height) - cocoaLocation.y);
    1.11              break;
    1.12 @@ -398,7 +398,7 @@
    1.13      /* Ignore events that aren't inside the client area (i.e. title bar.) */
    1.14      if ([event window]) {
    1.15          NSRect windowRect = [[[event window] contentView] frame];
    1.16 -        if (!NSPointInRect([event locationInWindow], windowRect)) {
    1.17 +        if (!NSMouseInRect([event locationInWindow], windowRect, NO)) {
    1.18              return;
    1.19          }
    1.20      }