summaryrefslogtreecommitdiff
path: root/src/xfns.c
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2008-09-18 18:12:22 +0000
committerChong Yidong <cyd@stupidchicken.com>2008-09-18 18:12:22 +0000
commitabe9d29cbe232d1341d846bdd4106e4238d8ae13 (patch)
treec4cf9575e0deb582227248f2825acff3761ad133 /src/xfns.c
parent95958e6c80618b3ae15e2558d59a1fc6b5b0f1d0 (diff)
downloademacs-abe9d29cbe232d1341d846bdd4106e4238d8ae13.tar.gz
(Fx_display_pixel_width, Fx_display_pixel_height)
(compute_tip_xy): Use x_display_pixel_height and x_display_pixel_width.
Diffstat (limited to 'src/xfns.c')
-rw-r--r--src/xfns.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/xfns.c b/src/xfns.c
index e079ff60250..f5e40143923 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -3656,7 +3656,7 @@ If omitted or nil, that stands for the selected frame's display. */)
{
struct x_display_info *dpyinfo = check_x_display_info (terminal);
- return make_number (dpyinfo->width);
+ return make_number (x_display_pixel_width (dpyinfo));
}
DEFUN ("x-display-pixel-height", Fx_display_pixel_height,
@@ -3670,7 +3670,7 @@ If omitted or nil, that stands for the selected frame's display. */)
{
struct x_display_info *dpyinfo = check_x_display_info (terminal);
- return make_number (dpyinfo->height);
+ return make_number (x_display_pixel_height (dpyinfo));
}
DEFUN ("x-display-planes", Fx_display_planes, Sx_display_planes,
@@ -4962,9 +4962,10 @@ compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y)
*root_y = XINT (top);
else if (*root_y + XINT (dy) <= 0)
*root_y = 0; /* Can happen for negative dy */
- else if (*root_y + XINT (dy) + height <= FRAME_X_DISPLAY_INFO (f)->height)
+ else if (*root_y + XINT (dy) + height
+ <= x_display_pixel_height (FRAME_X_DISPLAY_INFO (f)))
/* It fits below the pointer */
- *root_y += XINT (dy);
+ *root_y += XINT (dy);
else if (height + XINT (dy) <= *root_y)
/* It fits above the pointer. */
*root_y -= height + XINT (dy);
@@ -4976,7 +4977,8 @@ compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y)
*root_x = XINT (left);
else if (*root_x + XINT (dx) <= 0)
*root_x = 0; /* Can happen for negative dx */
- else if (*root_x + XINT (dx) + width <= FRAME_X_DISPLAY_INFO (f)->width)
+ else if (*root_x + XINT (dx) + width
+ <= x_display_pixel_width (FRAME_X_DISPLAY_INFO (f)))
/* It fits to the right of the pointer. */
*root_x += XINT (dx);
else if (width + XINT (dx) <= *root_x)