Mercurial > emacs
diff src/xfns.c @ 67581:05d48e1da3ad
* xfns.c (compute_tip_xy): Handle negative dx and dy.
* w32fns.c (compute_tip_xy): Ditto
* macfns.c (compute_tip_xy): Ditto
author | Jan Djärv <jan.h.d@swipnet.se> |
---|---|
date | Wed, 14 Dec 2005 20:58:33 +0000 |
parents | 5b6c71adc503 |
children | f6416d33b0a2 14a4eb789b45 |
line wrap: on
line diff
--- a/src/xfns.c Wed Dec 14 20:49:46 2005 +0000 +++ b/src/xfns.c Wed Dec 14 20:58:33 2005 +0000 @@ -4940,6 +4940,8 @@ if (INTEGERP (top)) *root_y = XINT (top); + else if (*root_y + XINT (dy) <= 0) + *root_y = 0; /* Can happen for negative dy */ else if (*root_y + XINT (dy) + height <= FRAME_X_DISPLAY_INFO (f)->height) /* It fits below the pointer */ *root_y += XINT (dy); @@ -4952,6 +4954,8 @@ if (INTEGERP (left)) *root_x = XINT (left); + else if (*root_x + XINT (dx) <= 0) + *root_x = 0; /* Can happen for negative dx */ else if (*root_x + XINT (dx) + width <= FRAME_X_DISPLAY_INFO (f)->width) /* It fits to the right of the pointer. */ *root_x += XINT (dx);