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