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 /src/xfns.c | |
| 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
Diffstat (limited to 'src/xfns.c')
| -rw-r--r-- | src/xfns.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); |