[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 6cd3740: Fix build errors on macOS 10.6 (bug#27059)
From: |
Alan Third |
Subject: |
[Emacs-diffs] master 6cd3740: Fix build errors on macOS 10.6 (bug#27059) |
Date: |
Thu, 1 Jun 2017 15:59:23 -0400 (EDT) |
branch: master
commit 6cd374085caa1c506555eef72535a47b91a4b4da
Author: Alan Third <address@hidden>
Commit: Alan Third <address@hidden>
Fix build errors on macOS 10.6 (bug#27059)
* src/nsfns.m (compute_tip_xy): Don't use CGRectContainsPoint.
---
src/nsfns.m | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/nsfns.m b/src/nsfns.m
index 7bac283..0c86507 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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 6cd3740: Fix build errors on macOS 10.6 (bug#27059),
Alan Third <=