diff options
| author | Alan Third | 2017-05-30 19:48:17 +0100 |
|---|---|---|
| committer | Alan Third | 2017-06-01 20:50:44 +0100 |
| commit | 6cd374085caa1c506555eef72535a47b91a4b4da (patch) | |
| tree | 23c79d157c979f5890d426380329096da92c1b9b /src | |
| parent | 5dc0129c299f6cc7a0bdfbf7edc92a85bb3a0597 (diff) | |
| download | emacs-6cd374085caa1c506555eef72535a47b91a4b4da.tar.gz emacs-6cd374085caa1c506555eef72535a47b91a4b4da.zip | |
Fix build errors on macOS 10.6 (bug#27059)
* src/nsfns.m (compute_tip_xy): Don't use CGRectContainsPoint.
Diffstat (limited to 'src')
| -rw-r--r-- | src/nsfns.m | 11 |
1 files changed, 7 insertions, 4 deletions
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, | |||
| 2752 | 2752 | ||
| 2753 | /* Find the screen that pt is on. */ | 2753 | /* Find the screen that pt is on. */ |
| 2754 | for (screen in [NSScreen screens]) | 2754 | for (screen in [NSScreen screens]) |
| 2755 | #ifdef NS_IMPL_COCOA | ||
| 2756 | if (CGRectContainsPoint ((CGRect)[screen frame], (CGPoint)pt)) | ||
| 2757 | #else | ||
| 2758 | if (pt.x >= screen.frame.origin.x | 2755 | if (pt.x >= screen.frame.origin.x |
| 2759 | && pt.x < screen.frame.origin.x + screen.frame.size.width | 2756 | && pt.x < screen.frame.origin.x + screen.frame.size.width |
| 2760 | && pt.y >= screen.frame.origin.y | 2757 | && pt.y >= screen.frame.origin.y |
| 2761 | && pt.y < screen.frame.origin.y + screen.frame.size.height) | 2758 | && pt.y < screen.frame.origin.y + screen.frame.size.height) |
| 2762 | #endif | ||
| 2763 | break; | 2759 | break; |
| 2764 | 2760 | ||
| 2761 | /* We could use this instead of the if above: | ||
| 2762 | |||
| 2763 | if (CGRectContainsPoint ([screen frame], pt)) | ||
| 2764 | |||
| 2765 | which would be neater, but it causes problems building on old | ||
| 2766 | versions of macOS and in GNUstep. */ | ||
| 2767 | |||
| 2765 | /* Ensure in bounds. (Note, screen origin = lower left.) */ | 2768 | /* Ensure in bounds. (Note, screen origin = lower left.) */ |
| 2766 | if (INTEGERP (left) || INTEGERP (right)) | 2769 | if (INTEGERP (left) || INTEGERP (right)) |
| 2767 | *root_x = pt.x; | 2770 | *root_x = pt.x; |