diff options
| -rw-r--r-- | src/nsfns.m | 8 |
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) | |||
| 2417 | /* Ensure in bounds. (Note, screen origin = lower left.) */ | 2417 | /* Ensure in bounds. (Note, screen origin = lower left.) */ |
| 2418 | if (pt.x + XINT (dx) <= 0) | 2418 | if (pt.x + XINT (dx) <= 0) |
| 2419 | *root_x = 0; /* Can happen for negative dx */ | 2419 | *root_x = 0; /* Can happen for negative dx */ |
| 2420 | else if (pt.x + XINT (dx) + width <= FRAME_NS_DISPLAY_INFO (f)->width) | 2420 | else if (pt.x + XINT (dx) + width |
| 2421 | <= x_display_pixel_width (FRAME_NS_DISPLAY_INFO (f))) | ||
| 2421 | /* It fits to the right of the pointer. */ | 2422 | /* It fits to the right of the pointer. */ |
| 2422 | *root_x = pt.x + XINT (dx); | 2423 | *root_x = pt.x + XINT (dx); |
| 2423 | else if (width + XINT (dx) <= pt.x) | 2424 | else if (width + XINT (dx) <= pt.x) |
| @@ -2430,12 +2431,13 @@ compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y) | |||
| 2430 | if (pt.y - XINT (dy) - height >= 0) | 2431 | if (pt.y - XINT (dy) - height >= 0) |
| 2431 | /* It fits below the pointer. */ | 2432 | /* It fits below the pointer. */ |
| 2432 | *root_y = pt.y - height - XINT (dy); | 2433 | *root_y = pt.y - height - XINT (dy); |
| 2433 | else if (pt.y + XINT (dy) + height <= FRAME_NS_DISPLAY_INFO (f)->height) | 2434 | else if (pt.y + XINT (dy) + height |
| 2435 | <= x_display_pixel_height (FRAME_NS_DISPLAY_INFO (f))) | ||
| 2434 | /* It fits above the pointer */ | 2436 | /* It fits above the pointer */ |
| 2435 | *root_y = pt.y + XINT (dy); | 2437 | *root_y = pt.y + XINT (dy); |
| 2436 | else | 2438 | else |
| 2437 | /* Put it on the top. */ | 2439 | /* Put it on the top. */ |
| 2438 | *root_y = FRAME_NS_DISPLAY_INFO (f)->height - height; | 2440 | *root_y = x_display_pixel_height (FRAME_NS_DISPLAY_INFO (f)) - height; |
| 2439 | } | 2441 | } |
| 2440 | 2442 | ||
| 2441 | 2443 | ||