aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xfns.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/xfns.c b/src/xfns.c
index e310c318850..c8bce15fbd6 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -11126,10 +11126,15 @@ compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y)
11126 11126
11127 if (INTEGERP (left)) 11127 if (INTEGERP (left))
11128 *root_x = XINT (left); 11128 *root_x = XINT (left);
11129 else if (*root_x + XINT (dx) + width > FRAME_X_DISPLAY_INFO (f)->width) 11129 else if (*root_x + XINT (dx) + width <= FRAME_X_DISPLAY_INFO (f)->width)
11130 /* It fits to the right of the pointer. */
11131 *root_x += XINT (dx);
11132 else if (width + XINT (dx) <= *root_x)
11133 /* It fits to the left of the pointer. */
11130 *root_x -= width + XINT (dx); 11134 *root_x -= width + XINT (dx);
11131 else 11135 else
11132 *root_x += XINT (dx); 11136 /* Put it left-justified on the screen--it ought to fit that way. */
11137 *root_x = 0;
11133} 11138}
11134 11139
11135 11140