summaryrefslogtreecommitdiff
path: root/src/nsfns.m
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2008-09-22 15:52:24 +0000
committerChong Yidong <cyd@stupidchicken.com>2008-09-22 15:52:24 +0000
commit889bd438410fe5f3fee484c0ebc1b44f13e89a88 (patch)
treedaa1f0aaae9190048dded2009a764fa806a24c05 /src/nsfns.m
parent6cb3af4a2bc24771184ea00f07c0c59b859c5b63 (diff)
downloademacs-889bd438410fe5f3fee484c0ebc1b44f13e89a88.tar.gz
(compute_tip_xy): Use x_display_pixel_width and
x_display_pixel_height.
Diffstat (limited to 'src/nsfns.m')
-rw-r--r--src/nsfns.m8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nsfns.m b/src/nsfns.m
index bd705b53868..e013809afc9 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -2417,7 +2417,8 @@ compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y)
/* Ensure in bounds. (Note, screen origin = lower left.) */
if (pt.x + XINT (dx) <= 0)
*root_x = 0; /* Can happen for negative dx */
- else if (pt.x + XINT (dx) + width <= FRAME_NS_DISPLAY_INFO (f)->width)
+ else if (pt.x + XINT (dx) + width
+ <= x_display_pixel_width (FRAME_NS_DISPLAY_INFO (f)))
/* It fits to the right of the pointer. */
*root_x = pt.x + XINT (dx);
else if (width + XINT (dx) <= pt.x)
@@ -2430,12 +2431,13 @@ compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y)
if (pt.y - XINT (dy) - height >= 0)
/* It fits below the pointer. */
*root_y = pt.y - height - XINT (dy);
- else if (pt.y + XINT (dy) + height <= FRAME_NS_DISPLAY_INFO (f)->height)
+ else if (pt.y + XINT (dy) + height
+ <= x_display_pixel_height (FRAME_NS_DISPLAY_INFO (f)))
/* It fits above the pointer */
*root_y = pt.y + XINT (dy);
else
/* Put it on the top. */
- *root_y = FRAME_NS_DISPLAY_INFO (f)->height - height;
+ *root_y = x_display_pixel_height (FRAME_NS_DISPLAY_INFO (f)) - height;
}