diff options
| author | Eli Zaretskii | 2008-09-06 13:43:36 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2008-09-06 13:43:36 +0000 |
| commit | 2de7397f328dca71014a534fcf1c2a0e14f8f5d5 (patch) | |
| tree | 83b8a472a79f238faa9dcc70cab7cf6a02198f06 /src/xmenu.c | |
| parent | 08792c113a276f9b4ae032decfdb0ce1289e1380 (diff) | |
| download | emacs-2de7397f328dca71014a534fcf1c2a0e14f8f5d5.tar.gz emacs-2de7397f328dca71014a534fcf1c2a0e14f8f5d5.zip | |
(xmenu_show) [!HAVE_X_WINDOWS]: If frame has a minibuffer, don't let lower
part of menu invade the echo area.
Diffstat (limited to 'src/xmenu.c')
| -rw-r--r-- | src/xmenu.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index fee66df9c0d..5cc92422007 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -2775,6 +2775,23 @@ xmenu_show (f, x, y, for_click, keymaps, title, error) | |||
| 2775 | y -= (uly + height) - dispheight; | 2775 | y -= (uly + height) - dispheight; |
| 2776 | uly = dispheight - height; | 2776 | uly = dispheight - height; |
| 2777 | } | 2777 | } |
| 2778 | #ifndef HAVE_X_WINDOWS | ||
| 2779 | if (FRAME_HAS_MINIBUF_P (f) && uly+height > dispheight - 1) | ||
| 2780 | { | ||
| 2781 | /* Move the menu away of the echo area, to avoid overwriting the | ||
| 2782 | menu with help echo messages or vice versa. */ | ||
| 2783 | if (BUFFERP (echo_area_buffer[0]) && WINDOWP (echo_area_window)) | ||
| 2784 | { | ||
| 2785 | y -= WINDOW_TOTAL_LINES (XWINDOW (echo_area_window)); | ||
| 2786 | uly -= WINDOW_TOTAL_LINES (XWINDOW (echo_area_window)); | ||
| 2787 | } | ||
| 2788 | else | ||
| 2789 | { | ||
| 2790 | y--; | ||
| 2791 | uly--; | ||
| 2792 | } | ||
| 2793 | } | ||
| 2794 | #endif | ||
| 2778 | if (ulx < 0) x -= ulx; | 2795 | if (ulx < 0) x -= ulx; |
| 2779 | if (uly < 0) y -= uly; | 2796 | if (uly < 0) y -= uly; |
| 2780 | 2797 | ||