+2005-12-14 Jan Dj\e,Ad\e(Brv <jan.h.d@swipnet.se>
+
+ * 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 <cyd@stupidchicken.com>
* print.c (print_preprocess): Go to a deeper print_depth to avoid
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);
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);
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);
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);
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);
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);