1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Irssi didn't redraw the screen properly when split windows were created but

were never set active.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2119 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-11-20 02:43:43 +00:00 committed by cras
parent 29aa8ef2c8
commit 275c04a6aa
3 changed files with 15 additions and 4 deletions

View File

@ -48,6 +48,8 @@ static GUI_WINDOW_REC *gui_window_init(WINDOW_REC *window,
settings_get_int("indent"), settings_get_int("indent"),
!settings_get_bool("indent_always"), !settings_get_bool("indent_always"),
get_default_indent_func()); get_default_indent_func());
if (parent->active == window)
textbuffer_view_set_window(gui->view, parent->screen_win);
return gui; return gui;
} }
@ -65,13 +67,14 @@ static void sig_window_create_override(gpointer tab)
static void gui_window_created(WINDOW_REC *window, void *automatic) static void gui_window_created(WINDOW_REC *window, void *automatic)
{ {
MAIN_WINDOW_REC *parent; MAIN_WINDOW_REC *parent;
int empty_window; int empty_window, new_parent;
g_return_if_fail(window != NULL); g_return_if_fail(window != NULL);
parent = window_create_override != 0 && new_parent = window_create_override == 0 ||
active_win != NULL && WINDOW_GUI(active_win) != NULL ? window_create_override == 2 ||
WINDOW_MAIN(active_win) : mainwindow_create(); active_win == NULL || WINDOW_GUI(active_win) == NULL;
parent = !new_parent ? WINDOW_MAIN(active_win) : mainwindow_create();
if (parent == NULL) { if (parent == NULL) {
/* not enough space for new window, but we really can't /* not enough space for new window, but we really can't
abort creation of the window anymore, so create hidden abort creation of the window anymore, so create hidden

View File

@ -176,6 +176,7 @@ MAIN_WINDOW_REC *mainwindow_create(void)
int space; int space;
rec = g_new0(MAIN_WINDOW_REC, 1); rec = g_new0(MAIN_WINDOW_REC, 1);
rec->dirty = TRUE;
rec->width = term_width; rec->width = term_width;
if (mainwindows == NULL) { if (mainwindows == NULL) {

View File

@ -1043,6 +1043,11 @@ static void sig_window_changed(void)
} }
} }
static void sig_gui_window_created(WINDOW_REC *window)
{
statusbars_add_visible(WINDOW_MAIN(window));
}
static void statusbar_item_def_destroy(void *key, void *value) static void statusbar_item_def_destroy(void *key, void *value)
{ {
g_free(key); g_free(key);
@ -1088,6 +1093,7 @@ void statusbar_init(void)
signal_add("terminal resized", (SIGNAL_FUNC) sig_terminal_resized); signal_add("terminal resized", (SIGNAL_FUNC) sig_terminal_resized);
signal_add("mainwindow resized", (SIGNAL_FUNC) sig_mainwindow_resized); signal_add("mainwindow resized", (SIGNAL_FUNC) sig_mainwindow_resized);
signal_add("mainwindow moved", (SIGNAL_FUNC) sig_mainwindow_resized); signal_add("mainwindow moved", (SIGNAL_FUNC) sig_mainwindow_resized);
signal_add("gui window created", (SIGNAL_FUNC) sig_gui_window_created);
signal_add("window changed", (SIGNAL_FUNC) sig_window_changed); signal_add("window changed", (SIGNAL_FUNC) sig_window_changed);
signal_add("mainwindow destroyed", (SIGNAL_FUNC) sig_mainwindow_destroyed); signal_add("mainwindow destroyed", (SIGNAL_FUNC) sig_mainwindow_destroyed);
signal_add_last("setup reread", (SIGNAL_FUNC) sig_setup_reload); signal_add_last("setup reread", (SIGNAL_FUNC) sig_setup_reload);
@ -1119,6 +1125,7 @@ void statusbar_deinit(void)
signal_remove("terminal resized", (SIGNAL_FUNC) sig_terminal_resized); signal_remove("terminal resized", (SIGNAL_FUNC) sig_terminal_resized);
signal_remove("mainwindow resized", (SIGNAL_FUNC) sig_mainwindow_resized); signal_remove("mainwindow resized", (SIGNAL_FUNC) sig_mainwindow_resized);
signal_remove("mainwindow moved", (SIGNAL_FUNC) sig_mainwindow_resized); signal_remove("mainwindow moved", (SIGNAL_FUNC) sig_mainwindow_resized);
signal_remove("gui window created", (SIGNAL_FUNC) sig_gui_window_created);
signal_remove("window changed", (SIGNAL_FUNC) sig_window_changed); signal_remove("window changed", (SIGNAL_FUNC) sig_window_changed);
signal_remove("mainwindow destroyed", (SIGNAL_FUNC) sig_mainwindow_destroyed); signal_remove("mainwindow destroyed", (SIGNAL_FUNC) sig_mainwindow_destroyed);
signal_remove("setup reread", (SIGNAL_FUNC) sig_setup_reload); signal_remove("setup reread", (SIGNAL_FUNC) sig_setup_reload);