diff options
| author | Jan Djärv | 2005-12-14 20:58:33 +0000 |
|---|---|---|
| committer | Jan Djärv | 2005-12-14 20:58:33 +0000 |
| commit | bf63eb69676e4bb7804802c3d3a727dbfac149d0 (patch) | |
| tree | a82d9ebb4479210b1053946c0cca8f11d2cbf97d | |
| parent | 9b98e161251e6d57205ff95ea19c2f07737f80da (diff) | |
| download | emacs-bf63eb69676e4bb7804802c3d3a727dbfac149d0.tar.gz emacs-bf63eb69676e4bb7804802c3d3a727dbfac149d0.zip | |
* xfns.c (compute_tip_xy): Handle negative dx and dy.
* w32fns.c (compute_tip_xy): Ditto
* macfns.c (compute_tip_xy): Ditto
| -rw-r--r-- | src/ChangeLog | 8 | ||||
| -rw-r--r-- | src/macfns.c | 6 | ||||
| -rw-r--r-- | src/w32fns.c | 4 | ||||
| -rw-r--r-- | src/xfns.c | 4 |
4 files changed, 21 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index b26416b7839..369846e302d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2005-12-14 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * xfns.c (compute_tip_xy): Handle negative dx and dy. | ||
| 4 | |||
| 5 | * w32fns.c (compute_tip_xy): Ditto | ||
| 6 | |||
| 7 | * macfns.c (compute_tip_xy): Ditto | ||
| 8 | |||
| 1 | 2005-12-14 Chong Yidong <cyd@stupidchicken.com> | 9 | 2005-12-14 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 10 | ||
| 3 | * print.c (print_preprocess): Go to a deeper print_depth to avoid | 11 | * print.c (print_preprocess): Go to a deeper print_depth to avoid |
diff --git a/src/macfns.c b/src/macfns.c index de6a055fce6..99abc643043 100644 --- a/src/macfns.c +++ b/src/macfns.c | |||
| @@ -3840,9 +3840,11 @@ 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) <= 0) | ||
| 3844 | *root_y = 0; /* Can happen for negative dy */ | ||
| 3843 | else if (*root_y + XINT (dy) + height <= FRAME_MAC_DISPLAY_INFO (f)->height) | 3845 | else if (*root_y + XINT (dy) + height <= FRAME_MAC_DISPLAY_INFO (f)->height) |
| 3844 | /* It fits below the pointer */ | 3846 | /* It fits below the pointer */ |
| 3845 | *root_y += XINT (dy); | 3847 | *root_y += XINT (dy); |
| 3846 | else if (height + XINT (dy) <= *root_y) | 3848 | else if (height + XINT (dy) <= *root_y) |
| 3847 | /* It fits above the pointer. */ | 3849 | /* It fits above the pointer. */ |
| 3848 | *root_y -= height + XINT (dy); | 3850 | *root_y -= height + XINT (dy); |
| @@ -3852,6 +3854,8 @@ compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y) | |||
| 3852 | 3854 | ||
| 3853 | if (INTEGERP (left)) | 3855 | if (INTEGERP (left)) |
| 3854 | *root_x = XINT (left); | 3856 | *root_x = XINT (left); |
| 3857 | else if (*root_x + XINT (dx) <= 0) | ||
| 3858 | *root_x = 0; /* Can happen for negative dx */ | ||
| 3855 | else if (*root_x + XINT (dx) + width <= FRAME_MAC_DISPLAY_INFO (f)->width) | 3859 | else if (*root_x + XINT (dx) + width <= FRAME_MAC_DISPLAY_INFO (f)->width) |
| 3856 | /* It fits to the right of the pointer. */ | 3860 | /* It fits to the right of the pointer. */ |
| 3857 | *root_x += XINT (dx); | 3861 | *root_x += XINT (dx); |
diff --git a/src/w32fns.c b/src/w32fns.c index 647267972dc..b82814bca72 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -7411,6 +7411,8 @@ 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) <= 0) | ||
| 7415 | *root_y = 0; /* Can happen for negative dy */ | ||
| 7414 | else if (*root_y + XINT (dy) + height <= FRAME_W32_DISPLAY_INFO (f)->height) | 7416 | else if (*root_y + XINT (dy) + height <= FRAME_W32_DISPLAY_INFO (f)->height) |
| 7415 | /* It fits below the pointer */ | 7417 | /* It fits below the pointer */ |
| 7416 | *root_y += XINT (dy); | 7418 | *root_y += XINT (dy); |
| @@ -7423,6 +7425,8 @@ compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y) | |||
| 7423 | 7425 | ||
| 7424 | if (INTEGERP (left)) | 7426 | if (INTEGERP (left)) |
| 7425 | *root_x = XINT (left); | 7427 | *root_x = XINT (left); |
| 7428 | else if (*root_x + XINT (dx) <= 0) | ||
| 7429 | *root_x = 0; /* Can happen for negative dx */ | ||
| 7426 | else if (*root_x + XINT (dx) + width <= FRAME_W32_DISPLAY_INFO (f)->width) | 7430 | else if (*root_x + XINT (dx) + width <= FRAME_W32_DISPLAY_INFO (f)->width) |
| 7427 | /* It fits to the right of the pointer. */ | 7431 | /* It fits to the right of the pointer. */ |
| 7428 | *root_x += XINT (dx); | 7432 | *root_x += XINT (dx); |
diff --git a/src/xfns.c b/src/xfns.c index 667b1411d1c..ead4d76c710 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -4940,6 +4940,8 @@ 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) <= 0) | ||
| 4944 | *root_y = 0; /* Can happen for negative dy */ | ||
| 4943 | else if (*root_y + XINT (dy) + height <= FRAME_X_DISPLAY_INFO (f)->height) | 4945 | else if (*root_y + XINT (dy) + height <= FRAME_X_DISPLAY_INFO (f)->height) |
| 4944 | /* It fits below the pointer */ | 4946 | /* It fits below the pointer */ |
| 4945 | *root_y += XINT (dy); | 4947 | *root_y += XINT (dy); |
| @@ -4952,6 +4954,8 @@ compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y) | |||
| 4952 | 4954 | ||
| 4953 | if (INTEGERP (left)) | 4955 | if (INTEGERP (left)) |
| 4954 | *root_x = XINT (left); | 4956 | *root_x = XINT (left); |
| 4957 | else if (*root_x + XINT (dx) <= 0) | ||
| 4958 | *root_x = 0; /* Can happen for negative dx */ | ||
| 4955 | else if (*root_x + XINT (dx) + width <= FRAME_X_DISPLAY_INFO (f)->width) | 4959 | else if (*root_x + XINT (dx) + width <= FRAME_X_DISPLAY_INFO (f)->width) |
| 4956 | /* It fits to the right of the pointer. */ | 4960 | /* It fits to the right of the pointer. */ |
| 4957 | *root_x += XINT (dx); | 4961 | *root_x += XINT (dx); |