Commit 6cd37408 authored by Alan Third's avatar Alan Third
Browse files

Fix build errors on macOS 10.6 (bug#27059)

* src/nsfns.m (compute_tip_xy): Don't use CGRectContainsPoint.
parent 5dc0129c
......@@ -2752,16 +2752,19 @@ and GNUstep implementations ("distributor-specific release
/* Find the screen that pt is on. */
for (screen in [NSScreen screens])
if (CGRectContainsPoint ((CGRect)[screen frame], (CGPoint)pt))
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)
/* 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;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment