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 | |
| 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')
| -rw-r--r-- | src/macfns.c | 14 | ||||
| -rw-r--r-- | src/w32fns.c | 17 | ||||
| -rw-r--r-- | src/xfns.c | 17 |
3 files changed, 24 insertions, 24 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); |
diff --git a/src/w32fns.c b/src/w32fns.c index d1e4e49bb03..647267972dc 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -7411,16 +7411,15 @@ compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y) | |||
| 7411 | 7411 | ||
| 7412 | if (INTEGERP (top)) | 7412 | if (INTEGERP (top)) |
| 7413 | *root_y = XINT (top); | 7413 | *root_y = XINT (top); |
| 7414 | else if (*root_y + XINT (dy) - height < 0) | 7414 | else if (*root_y + XINT (dy) + height <= FRAME_W32_DISPLAY_INFO (f)->height) |
| 7415 | *root_y -= XINT (dy); | 7415 | /* It fits below the pointer */ |
| 7416 | /* If there's not enough place below the pointer, put tip above it. */ | ||
| 7417 | else if (*root_y + XINT (dy) >= FRAME_W32_DISPLAY_INFO (f)->height) | ||
| 7418 | *root_y -= XINT (dy); | ||
| 7419 | else | ||
| 7420 | { | ||
| 7421 | *root_y -= height; | ||
| 7422 | *root_y += XINT (dy); | 7416 | *root_y += XINT (dy); |
| 7423 | } | 7417 | else if (height + XINT (dy) <= *root_y) |
| 7418 | /* It fits above the pointer. */ | ||
| 7419 | *root_y -= height + XINT (dy); | ||
| 7420 | else | ||
| 7421 | /* Put it on the top. */ | ||
| 7422 | *root_y = 0; | ||
| 7424 | 7423 | ||
| 7425 | if (INTEGERP (left)) | 7424 | if (INTEGERP (left)) |
| 7426 | *root_x = XINT (left); | 7425 | *root_x = XINT (left); |
diff --git a/src/xfns.c b/src/xfns.c index ee4a7bf3b00..667b1411d1c 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -4940,16 +4940,15 @@ compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y) | |||
| 4940 | 4940 | ||
| 4941 | if (INTEGERP (top)) | 4941 | if (INTEGERP (top)) |
| 4942 | *root_y = XINT (top); | 4942 | *root_y = XINT (top); |
| 4943 | else if (*root_y + XINT (dy) - height < 0) | 4943 | else if (*root_y + XINT (dy) + height <= FRAME_X_DISPLAY_INFO (f)->height) |
| 4944 | *root_y -= XINT (dy); | 4944 | /* It fits below the pointer */ |
| 4945 | else if (*root_y + XINT (dy) >= FRAME_X_DISPLAY_INFO (f)->height) | ||
| 4946 | /* Put tip above the pointer. */ | ||
| 4947 | *root_y -= XINT (dy); | ||
| 4948 | else | ||
| 4949 | { | ||
| 4950 | *root_y -= height; | ||
| 4951 | *root_y += XINT (dy); | 4945 | *root_y += XINT (dy); |
| 4952 | } | 4946 | else if (height + XINT (dy) <= *root_y) |
| 4947 | /* It fits above the pointer. */ | ||
| 4948 | *root_y -= height + XINT (dy); | ||
| 4949 | else | ||
| 4950 | /* Put it on the top. */ | ||
| 4951 | *root_y = 0; | ||
| 4953 | 4952 | ||
| 4954 | if (INTEGERP (left)) | 4953 | if (INTEGERP (left)) |
| 4955 | *root_x = XINT (left); | 4954 | *root_x = XINT (left); |