# HG changeset patch # User Jan Dj¸«£rv # Date 1134593913 0 # Node ID 05d48e1da3ad113ffeacd1415808566d7aff5824 # Parent a82dd1079b45274cf381bd74541bdc6feb1bbbd0 * xfns.c (compute_tip_xy): Handle negative dx and dy. * w32fns.c (compute_tip_xy): Ditto * macfns.c (compute_tip_xy): Ditto diff -r a82dd1079b45 -r 05d48e1da3ad src/ChangeLog --- a/src/ChangeLog Wed Dec 14 20:49:46 2005 +0000 +++ b/src/ChangeLog Wed Dec 14 20:58:33 2005 +0000 @@ -1,3 +1,11 @@ +2005-12-14 Jan Dj,Ad(Brv + + * xfns.c (compute_tip_xy): Handle negative dx and dy. + + * w32fns.c (compute_tip_xy): Ditto + + * macfns.c (compute_tip_xy): Ditto + 2005-12-14 Chong Yidong * print.c (print_preprocess): Go to a deeper print_depth to avoid diff -r a82dd1079b45 -r 05d48e1da3ad src/macfns.c --- a/src/macfns.c Wed Dec 14 20:49:46 2005 +0000 +++ b/src/macfns.c Wed Dec 14 20:58:33 2005 +0000 @@ -3840,9 +3840,11 @@ 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_MAC_DISPLAY_INFO (f)->height) /* It fits below the pointer */ - *root_y += XINT (dy); + *root_y += XINT (dy); else if (height + XINT (dy) <= *root_y) /* It fits above the pointer. */ *root_y -= height + XINT (dy); @@ -3852,6 +3854,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_MAC_DISPLAY_INFO (f)->width) /* It fits to the right of the pointer. */ *root_x += XINT (dx); diff -r a82dd1079b45 -r 05d48e1da3ad src/w32fns.c --- a/src/w32fns.c Wed Dec 14 20:49:46 2005 +0000 +++ b/src/w32fns.c Wed Dec 14 20:58:33 2005 +0000 @@ -7411,6 +7411,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_W32_DISPLAY_INFO (f)->height) /* It fits below the pointer */ *root_y += XINT (dy); @@ -7423,6 +7425,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_W32_DISPLAY_INFO (f)->width) /* It fits to the right of the pointer. */ *root_x += XINT (dx); diff -r a82dd1079b45 -r 05d48e1da3ad src/xfns.c --- 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);