From: Eli Zaretskii Date: Fri, 2 Dec 2005 18:32:46 +0000 (+0000) Subject: (compute_tip_xy): Put tip above pointer if it doesn't fit below. X-Git-Tag: emacs-pretest-22.0.90~5542 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5a98616edfc27abf7f6e8b835477fa818dd9bc41;p=emacs.git (compute_tip_xy): Put tip above pointer if it doesn't fit below. --- diff --git a/src/ChangeLog b/src/ChangeLog index cadfad7c48f..ee9eed6739b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-12-02 Eli Zaretskii + + * w32fns.c (compute_tip_xy): Put tip above pointer if it doesn't + fit below. + 2005-12-02 Jan Dj,Ad(Brv * xterm.h: Add prototype for xg_set_icon_from_xpm_data. diff --git a/src/w32fns.c b/src/w32fns.c index e18ee3d43a9..6fc6c860808 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -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;