# HG changeset patch # User Fred Pierresteguy # Date 764447012 0 # Node ID 55236c5bca7cee465a34ec9fd8cec1811a38a860 # Parent c6cafb1168b3b117bdacb4df03f14cfa2e2671bd (update_frame_menubar): Function renamed from update_one_frame_psheets. (initialize_frame_menubar): New function. (set_frame_menubar): Call menu_bar_items when items is NIL. diff -r c6cafb1168b3 -r 55236c5bca7c src/xmenu.c --- a/src/xmenu.c Wed Mar 23 18:22:13 1994 +0000 +++ b/src/xmenu.c Wed Mar 23 18:23:32 1994 +0000 @@ -1093,7 +1093,7 @@ extern void EmacsFrameSetCharSize (); static void -update_one_frame_psheets (f) +update_frame_menubar (f) FRAME_PTR f; { struct x_display *x = f->display.x; @@ -1162,7 +1162,8 @@ wv->enabled = 1; save_wv = first_wv = wv; - items = FRAME_MENU_BAR_ITEMS (f); + if (NILP (items = FRAME_MENU_BAR_ITEMS (f))) + items = FRAME_MENU_BAR_ITEMS (f) = menu_bar_items (FRAME_MENU_BAR_ITEMS (f)); for (i = 0; i < XVECTOR (items)->size; i += 3) { @@ -1202,7 +1203,7 @@ free_menubar_widget_value_tree (first_wv); - update_one_frame_psheets (f); + update_frame_menubar (f); UNBLOCK_INPUT; } @@ -1224,6 +1225,16 @@ UNBLOCK_INPUT; } } +/* Called from Fx_create_frame to create the inital menubar of a frame + before it is mapped, so that the window is mapped with the menubar already + there instead of us tacking it on later and thrashing the window after it + is visible. */ +void +initialize_frame_menubar (f) + FRAME_PTR f; +{ + set_frame_menubar (f); +} /* Nonzero if position X, Y relative to inside of frame F is in some other menu bar item. */