summaryrefslogtreecommitdiff
path: root/src/fe-text/gui-windows.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-11-20 02:43:43 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-11-20 02:43:43 +0000
commit275c04a6aadf38e628a26c0a7e1d458469bec88c (patch)
treed6351858e4afe38f2576e5186153dfb93fb81dd0 /src/fe-text/gui-windows.c
parent29aa8ef2c83035e51caacf97df214385b01cb620 (diff)
downloadirssi-275c04a6aadf38e628a26c0a7e1d458469bec88c.zip
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
Diffstat (limited to 'src/fe-text/gui-windows.c')
-rw-r--r--src/fe-text/gui-windows.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/fe-text/gui-windows.c b/src/fe-text/gui-windows.c
index ce984a97..4f0a8e48 100644
--- a/src/fe-text/gui-windows.c
+++ b/src/fe-text/gui-windows.c
@@ -48,6 +48,8 @@ static GUI_WINDOW_REC *gui_window_init(WINDOW_REC *window,
settings_get_int("indent"),
!settings_get_bool("indent_always"),
get_default_indent_func());
+ if (parent->active == window)
+ textbuffer_view_set_window(gui->view, parent->screen_win);
return gui;
}
@@ -65,13 +67,14 @@ static void sig_window_create_override(gpointer tab)
static void gui_window_created(WINDOW_REC *window, void *automatic)
{
MAIN_WINDOW_REC *parent;
- int empty_window;
+ int empty_window, new_parent;
g_return_if_fail(window != NULL);
- parent = window_create_override != 0 &&
- active_win != NULL && WINDOW_GUI(active_win) != NULL ?
- WINDOW_MAIN(active_win) : mainwindow_create();
+ new_parent = window_create_override == 0 ||
+ window_create_override == 2 ||
+ active_win == NULL || WINDOW_GUI(active_win) == NULL;
+ parent = !new_parent ? WINDOW_MAIN(active_win) : mainwindow_create();
if (parent == NULL) {
/* not enough space for new window, but we really can't
abort creation of the window anymore, so create hidden