changeset 15111:6a5ae152de0d

(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.
author Richard M. Stallman <rms@gnu.org>
date Mon, 29 Apr 1996 15:57:12 +0000
parents 5a9c77df2706
children e850ebd317e6
files src/xdisp.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Mon Apr 29 15:56:24 1996 +0000
+++ b/src/xdisp.c	Mon Apr 29 15:57:12 1996 +0000
@@ -1369,6 +1369,8 @@
 	    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 @@
   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,