summaryrefslogtreecommitdiff
path: root/src/xmenu.c
diff options
context:
space:
mode:
authorFred Pierresteguy <F.Pierresteguy@frcl.bull.fr>1994-03-23 18:23:32 +0000
committerFred Pierresteguy <F.Pierresteguy@frcl.bull.fr>1994-03-23 18:23:32 +0000
commit6af6cbb5306f58a93da8e141d0dfe0a0d6cd454d (patch)
treeab55da822ee76cf4dc4204ab39f1a64c4523abcc /src/xmenu.c
parentc4ff032379d9dcadb1d679ab74507c180fa5a709 (diff)
downloademacs-6af6cbb5306f58a93da8e141d0dfe0a0d6cd454d.tar.gz
(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.
Diffstat (limited to 'src/xmenu.c')
-rw-r--r--src/xmenu.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index 354bf778f01..11ea624660d 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1093,7 +1093,7 @@ free_menubar_widget_value_tree (wv)
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 @@ set_frame_menubar (f)
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 @@ set_frame_menubar (f)
free_menubar_widget_value_tree (first_wv);
- update_one_frame_psheets (f);
+ update_frame_menubar (f);
UNBLOCK_INPUT;
}
@@ -1224,6 +1225,16 @@ free_frame_menubar (f)
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. */