From: Alan Third Date: Tue, 30 May 2017 18:48:17 +0000 (+0100) Subject: Fix build errors on macOS 10.6 (bug#27059) X-Git-Tag: emacs-26.0.90~521^2~195 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6cd374085caa1c506555eef72535a47b91a4b4da;p=emacs.git Fix build errors on macOS 10.6 (bug#27059) * src/nsfns.m (compute_tip_xy): Don't use CGRectContainsPoint. --- diff --git a/src/nsfns.m b/src/nsfns.m index 7bac2836fed..0c865070fb7 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -2752,16 +2752,19 @@ compute_tip_xy (struct frame *f, /* Find the screen that pt is on. */ for (screen in [NSScreen screens]) -#ifdef NS_IMPL_COCOA - if (CGRectContainsPoint ((CGRect)[screen frame], (CGPoint)pt)) -#else if (pt.x >= screen.frame.origin.x && pt.x < screen.frame.origin.x + screen.frame.size.width && pt.y >= screen.frame.origin.y && pt.y < screen.frame.origin.y + screen.frame.size.height) -#endif break; + /* We could use this instead of the if above: + + if (CGRectContainsPoint ([screen frame], pt)) + + which would be neater, but it causes problems building on old + versions of macOS and in GNUstep. */ + /* Ensure in bounds. (Note, screen origin = lower left.) */ if (INTEGERP (left) || INTEGERP (right)) *root_x = pt.x;