summaryrefslogtreecommitdiff
path: root/src/fe-text/mainwindows.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-06-01 19:12:07 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-06-01 19:12:07 +0000
commite403244a2d10f82862d88c24dbceeed02874fba9 (patch)
tree680df0debc9bbc1659645b0a22ffa3b410a2cfaf /src/fe-text/mainwindows.c
parent3f0e76d5168a52934f3bf96f994d890688937767 (diff)
downloadirssi-e403244a2d10f82862d88c24dbceeed02874fba9.zip
Resizing window destroyed curses window, but didn't update the view's curses
window which kept using the old one, and probably crashed soon. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1532 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text/mainwindows.c')
-rw-r--r--src/fe-text/mainwindows.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/fe-text/mainwindows.c b/src/fe-text/mainwindows.c
index d727464e..72977598 100644
--- a/src/fe-text/mainwindows.c
+++ b/src/fe-text/mainwindows.c
@@ -84,6 +84,9 @@ static void mainwindow_resize(MAIN_WINDOW_REC *window, int xdiff, int ydiff)
#else
delwin(window->curses_win);
create_curses_window(window);
+
+ textbuffer_view_set_window(WINDOW_GUI(window->active)->view,
+ window->curses_win);
#endif
#endif
@@ -234,13 +237,13 @@ void mainwindow_destroy(MAIN_WINDOW_REC *window)
{
g_return_if_fail(window != NULL);
+ mainwindows = g_slist_remove(mainwindows, window);
+ signal_emit("mainwindow destroyed", 1, window);
+
#ifdef USE_CURSES_WINDOWS
delwin(window->curses_win);
#endif
- mainwindows = g_slist_remove(mainwindows, window);
- signal_emit("mainwindow destroyed", 1, window);
-
if (!quitting && mainwindows != NULL) {
gui_windows_remove_parent(window);
mainwindows_add_space(window->first_line, window->last_line+window->statusbar_lines);
@@ -248,6 +251,7 @@ void mainwindow_destroy(MAIN_WINDOW_REC *window)
mainwindows_redraw();
statusbar_redraw(NULL);
}
+
g_free(window);
if (active_mainwin == window) active_mainwin = NULL;