(compute_tip_xy): Put tip above pointer if it doesn't fit below.
authorEli Zaretskii <eliz@gnu.org>
Fri, 2 Dec 2005 18:32:46 +0000 (18:32 +0000)
committerEli Zaretskii <eliz@gnu.org>
Fri, 2 Dec 2005 18:32:46 +0000 (18:32 +0000)
src/ChangeLog
src/w32fns.c

index cadfad7..ee9eed6 100644 (file)
@@ -1,3 +1,8 @@
+2005-12-02  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32fns.c (compute_tip_xy): Put tip above pointer if it doesn't
+       fit below.
+
 2005-12-02  Jan Dj\e,Ad\e(Brv  <jan.h.d@swipnet.se>
 
        * xterm.h: Add prototype for xg_set_icon_from_xpm_data.
index e18ee3d..6fc6c86 100644 (file)
@@ -7413,6 +7413,9 @@ compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y)
     *root_y = XINT (top);
   else if (*root_y + XINT (dy) - height < 0)
     *root_y -= XINT (dy);
+  /* If there's not enough place below the pointer, put tip above it.  */
+  else if (*root_y + XINT (dy) >= FRAME_W32_DISPLAY_INFO (f)->height)
+    *root_y -= XINT (dy);
   else
     {
       *root_y -= height;