From 469937ac967eb70672eb9f2fd8f23e5c681c0116 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 29 Apr 1996 15:57:12 +0000 Subject: [PATCH] (display_menu_bar): FRAME_MENU_BAR_ITEMS now has four elements per item. (update_menu_bar): If we update FRAME_MENU_BAR_ITEMS, also set w->update_mode_line. --- src/xdisp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 5f05b79338d..e2d75f6ee2b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1369,6 +1369,8 @@ update_menu_bar (f, save_match_data) call0 (Qrecompute_lucid_menubar); safe_run_hooks (Qmenu_bar_update_hook); FRAME_MENU_BAR_ITEMS (f) = menu_bar_items (FRAME_MENU_BAR_ITEMS (f)); + /* Make sure to redisplay the menu bar in case we change it. */ + w->update_mode_line = Qt; #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) if (FRAME_WINDOW_P (f)) set_frame_menubar (f, 0, 0); @@ -3260,14 +3262,14 @@ display_menu_bar (w) get_display_line (f, vpos, 0); items = FRAME_MENU_BAR_ITEMS (f); - for (i = 0; i < XVECTOR (items)->size; i += 3) + for (i = 0; i < XVECTOR (items)->size; i += 4) { Lisp_Object pos, string; string = XVECTOR (items)->contents[i + 1]; if (NILP (string)) break; - XSETFASTINT (XVECTOR (items)->contents[i + 2], hpos); + XSETFASTINT (XVECTOR (items)->contents[i + 3], hpos); if (hpos < maxendcol) hpos = display_string (XWINDOW (FRAME_ROOT_WINDOW (f)), vpos, -- 2.39.2