From e50581faf3f41921e3001118be9b1c2a84f5e8eb Mon Sep 17 00:00:00 2001 From: witekfl Date: Sat, 4 Mar 2006 11:42:57 +0100 Subject: [PATCH] Menu bar moved at the end of windows queue. bfu_technology activated at the right place. --- src/bfu/menu.c | 10 ++++++++-- src/session/session.c | 1 + src/viewer/action.c | 3 --- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/bfu/menu.c b/src/bfu/menu.c index 09a3e485..ca10a1fe 100644 --- a/src/bfu/menu.c +++ b/src/bfu/menu.c @@ -870,6 +870,7 @@ do_mainmenu(struct terminal *term, struct menu_item *items, { int init = 0; struct menu *menu; + struct window *win; if (!term->main_menu) { term->main_menu = mem_calloc(1, sizeof(*menu)); @@ -891,9 +892,14 @@ do_mainmenu(struct terminal *term, struct menu_item *items, if (init) { menu->selected = -1; add_window(term, mainmenu_handler, menu); + foreach (win, term->windows) { + if (win->data == menu) { + del_from_list(win); + add_to_list_end(term->windows, win); + break; + } + } } else { - struct window *win; - foreach (win, term->windows) { if (win->data == menu) { del_from_list(win); diff --git a/src/session/session.c b/src/session/session.c index d79b80f4..48f5a451 100644 --- a/src/session/session.c +++ b/src/session/session.c @@ -903,6 +903,7 @@ init_session(struct session *base_session, struct terminal *term, if (!in_background) switch_to_tab(term, get_tab_number(ses->tab), -1); + if (!term->main_menu) activate_bfu_technology(ses, -1); return ses; } diff --git a/src/viewer/action.c b/src/viewer/action.c index cefbf639..673186ac 100644 --- a/src/viewer/action.c +++ b/src/viewer/action.c @@ -70,9 +70,6 @@ do_action(struct session *ses, enum main_action action_id, int verbose) struct document_view *doc_view = current_frame(ses); struct link *link = NULL; - /* FIXME: Move it to appropriate place */ - if (!term->main_menu) activate_bfu_technology(ses, -1); - if (action_id == -1) goto unknown_action; if (doc_view && doc_view->vs) {