Mercurial > emacs
changeset 98035:611a022eaebb
(xmenu_show) [!HAVE_X_WINDOWS]: If frame has a minibuffer, don't let lower
part of menu invade the echo area.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 06 Sep 2008 13:41:24 +0000 |
parents | 8ed0a4979b05 |
children | 70619fdc3dac |
files | src/xmenu.c |
diffstat | 1 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xmenu.c Sat Sep 06 12:52:42 2008 +0000 +++ b/src/xmenu.c Sat Sep 06 13:41:24 2008 +0000 @@ -2775,6 +2775,23 @@ y -= (uly + height) - dispheight; uly = dispheight - height; } +#ifndef HAVE_X_WINDOWS + if (FRAME_HAS_MINIBUF_P (f) && uly+height > dispheight - 1) + { + /* Move the menu away of the echo area, to avoid overwriting the + menu with help echo messages or vice versa. */ + if (BUFFERP (echo_area_buffer[0]) && WINDOWP (echo_area_window)) + { + y -= WINDOW_TOTAL_LINES (XWINDOW (echo_area_window)); + uly -= WINDOW_TOTAL_LINES (XWINDOW (echo_area_window)); + } + else + { + y--; + uly--; + } + } +#endif if (ulx < 0) x -= ulx; if (uly < 0) y -= uly;