diff options
| author | Jan Djärv | 2005-12-12 09:32:59 +0000 |
|---|---|---|
| committer | Jan Djärv | 2005-12-12 09:32:59 +0000 |
| commit | 7e8410d1abe43466b20aec2f72e075403c948bbb (patch) | |
| tree | 683b68649cc1618d73954a3f7556796c113ae87d /src/macfns.c | |
| parent | 57134802f74ad81aa28a46ba0485aac5f59c65a5 (diff) | |
| download | emacs-7e8410d1abe43466b20aec2f72e075403c948bbb.tar.gz emacs-7e8410d1abe43466b20aec2f72e075403c948bbb.zip | |
* (compute_tip_xy): Calculate root_y the same way as root_x,
i.e. dy is offset from top of frame instead of bottom.
Diffstat (limited to 'src/macfns.c')
| -rw-r--r-- | src/macfns.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/macfns.c b/src/macfns.c index 9d23f47b5ed..de6a055fce6 100644 --- a/src/macfns.c +++ b/src/macfns.c | |||
| @@ -3840,13 +3840,15 @@ compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y) | |||
| 3840 | 3840 | ||
| 3841 | if (INTEGERP (top)) | 3841 | if (INTEGERP (top)) |
| 3842 | *root_y = XINT (top); | 3842 | *root_y = XINT (top); |
| 3843 | else if (*root_y + XINT (dy) - height < 0) | 3843 | else if (*root_y + XINT (dy) + height <= FRAME_MAC_DISPLAY_INFO (f)->height) |
| 3844 | *root_y -= XINT (dy); | 3844 | /* It fits below the pointer */ |
| 3845 | else | ||
| 3846 | { | ||
| 3847 | *root_y -= height; | ||
| 3848 | *root_y += XINT (dy); | 3845 | *root_y += XINT (dy); |
| 3849 | } | 3846 | else if (height + XINT (dy) <= *root_y) |
| 3847 | /* It fits above the pointer. */ | ||
| 3848 | *root_y -= height + XINT (dy); | ||
| 3849 | else | ||
| 3850 | /* Put it on the top. */ | ||
| 3851 | *root_y = 0; | ||
| 3850 | 3852 | ||
| 3851 | if (INTEGERP (left)) | 3853 | if (INTEGERP (left)) |
| 3852 | *root_x = XINT (left); | 3854 | *root_x = XINT (left); |