diff options
| author | Chong Yidong | 2008-09-18 18:12:22 +0000 |
|---|---|---|
| committer | Chong Yidong | 2008-09-18 18:12:22 +0000 |
| commit | abe9d29cbe232d1341d846bdd4106e4238d8ae13 (patch) | |
| tree | c4cf9575e0deb582227248f2825acff3761ad133 /src | |
| parent | 95958e6c80618b3ae15e2558d59a1fc6b5b0f1d0 (diff) | |
| download | emacs-abe9d29cbe232d1341d846bdd4106e4238d8ae13.tar.gz emacs-abe9d29cbe232d1341d846bdd4106e4238d8ae13.zip | |
(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')
| -rw-r--r-- | src/xfns.c | 12 |
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. */) | |||
| 3656 | { | 3656 | { |
| 3657 | struct x_display_info *dpyinfo = check_x_display_info (terminal); | 3657 | struct x_display_info *dpyinfo = check_x_display_info (terminal); |
| 3658 | 3658 | ||
| 3659 | return make_number (dpyinfo->width); | 3659 | return make_number (x_display_pixel_width (dpyinfo)); |
| 3660 | } | 3660 | } |
| 3661 | 3661 | ||
| 3662 | DEFUN ("x-display-pixel-height", Fx_display_pixel_height, | 3662 | 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. */) | |||
| 3670 | { | 3670 | { |
| 3671 | struct x_display_info *dpyinfo = check_x_display_info (terminal); | 3671 | struct x_display_info *dpyinfo = check_x_display_info (terminal); |
| 3672 | 3672 | ||
| 3673 | return make_number (dpyinfo->height); | 3673 | return make_number (x_display_pixel_height (dpyinfo)); |
| 3674 | } | 3674 | } |
| 3675 | 3675 | ||
| 3676 | DEFUN ("x-display-planes", Fx_display_planes, Sx_display_planes, | 3676 | 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) | |||
| 4962 | *root_y = XINT (top); | 4962 | *root_y = XINT (top); |
| 4963 | else if (*root_y + XINT (dy) <= 0) | 4963 | else if (*root_y + XINT (dy) <= 0) |
| 4964 | *root_y = 0; /* Can happen for negative dy */ | 4964 | *root_y = 0; /* Can happen for negative dy */ |
| 4965 | else if (*root_y + XINT (dy) + height <= FRAME_X_DISPLAY_INFO (f)->height) | 4965 | else if (*root_y + XINT (dy) + height |
| 4966 | <= x_display_pixel_height (FRAME_X_DISPLAY_INFO (f))) | ||
| 4966 | /* It fits below the pointer */ | 4967 | /* It fits below the pointer */ |
| 4967 | *root_y += XINT (dy); | 4968 | *root_y += XINT (dy); |
| 4968 | else if (height + XINT (dy) <= *root_y) | 4969 | else if (height + XINT (dy) <= *root_y) |
| 4969 | /* It fits above the pointer. */ | 4970 | /* It fits above the pointer. */ |
| 4970 | *root_y -= height + XINT (dy); | 4971 | *root_y -= height + XINT (dy); |
| @@ -4976,7 +4977,8 @@ compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y) | |||
| 4976 | *root_x = XINT (left); | 4977 | *root_x = XINT (left); |
| 4977 | else if (*root_x + XINT (dx) <= 0) | 4978 | else if (*root_x + XINT (dx) <= 0) |
| 4978 | *root_x = 0; /* Can happen for negative dx */ | 4979 | *root_x = 0; /* Can happen for negative dx */ |
| 4979 | else if (*root_x + XINT (dx) + width <= FRAME_X_DISPLAY_INFO (f)->width) | 4980 | else if (*root_x + XINT (dx) + width |
| 4981 | <= x_display_pixel_width (FRAME_X_DISPLAY_INFO (f))) | ||
| 4980 | /* It fits to the right of the pointer. */ | 4982 | /* It fits to the right of the pointer. */ |
| 4981 | *root_x += XINT (dx); | 4983 | *root_x += XINT (dx); |
| 4982 | else if (width + XINT (dx) <= *root_x) | 4984 | else if (width + XINT (dx) <= *root_x) |