WINDOW_REC *rec = tmp->data;
if (rec != skip_window) {
- if (WINDOW_MAIN(rec) == mainwin) {
- window_set_active(rec);
- return;
- }
- other = rec;
+ other = rec;
+ break;
}
}
- /* no more non-sticky windows, remove main window */
window_set_active(other);
- mainwindow_destroy(mainwin);
+ if (mainwindows->next != NULL)
+ mainwindow_destroy(mainwin);
}
void mainwindows_recreate(void)
term_window_destroy(window->screen_win);
- if (!quitting && mainwindows != NULL) {
+ if (mainwindows != NULL) {
gui_windows_remove_parent(window);
- mainwindows_add_space(window->first_line, window->last_line);
-
- mainwindows_redraw();
+ if (!quitting) {
+ mainwindows_add_space(window->first_line,
+ window->last_line);
+ mainwindows_redraw();
+ }
}
g_free(window);
window_reparent(active_win, rec);
}
-static void windows_print_sticky(MAIN_WINDOW_REC *win)
+static void windows_print_sticky(WINDOW_REC *win)
{
+ MAIN_WINDOW_REC *mainwin;
GSList *tmp, *list;
GString *str;
+ mainwin = WINDOW_MAIN(win);
+
/* convert to string */
str = g_string_new(NULL);
- list = get_sticky_windows_sorted(win);
+ list = get_sticky_windows_sorted(mainwin);
for (tmp = list; tmp != NULL; tmp = tmp->next) {
WINDOW_REC *rec = tmp->data;
g_string_truncate(str, str->len-2);
g_slist_free(list);
- printformat_window(win->active, MSGLEVEL_CLIENTCRAP,
+ printformat_window(win, MSGLEVEL_CLIENTCRAP,
TXT_WINDOW_INFO_STICKY, str->str);
g_string_free(str, TRUE);
}
static void sig_window_print_info(WINDOW_REC *win)
{
+ GUI_WINDOW_REC *gui;
+
+ gui = WINDOW_GUI(win);
+ if (gui->use_scroll) {
+ printformat_window(win, MSGLEVEL_CLIENTCRAP,
+ TXT_WINDOW_INFO_SCROLL,
+ gui->scroll ? "yes" : "no");
+ }
+
if (WINDOW_MAIN(win)->sticky_windows)
- windows_print_sticky(WINDOW_MAIN(win));
+ windows_print_sticky(win);
}
void mainwindows_init(void)