summaryrefslogtreecommitdiff
path: root/src/fe-text/gui-windows.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-10-28 18:40:12 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-10-28 18:40:12 +0000
commitfb439b5c2ae93e0d42a59cf8900a17cbb72214f6 (patch)
tree604d6da2c3a9dcbbf33c72245043d7b8b6863fa0 /src/fe-text/gui-windows.c
parent44b12481d66c68e00f5dade2a0fc815497b1535c (diff)
downloadirssi-fb439b5c2ae93e0d42a59cf8900a17cbb72214f6.zip
Redrawing fixes - irssi should now rarely redraw stuff uselessly in screen.
Most of the code now just marks the window/statusbar/etc. as dirty, and lets the dirty-checker handle it later. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1926 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text/gui-windows.c')
-rw-r--r--src/fe-text/gui-windows.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/fe-text/gui-windows.c b/src/fe-text/gui-windows.c
index 5c6f00e5..1ce50fb6 100644
--- a/src/fe-text/gui-windows.c
+++ b/src/fe-text/gui-windows.c
@@ -117,8 +117,14 @@ void gui_window_resize(WINDOW_REC *window, int width, int height)
{
GUI_WINDOW_REC *gui;
+ if (window->width == width && window->height == height)
+ return;
+
gui = WINDOW_GUI(window);
+ irssi_set_dirty();
+ WINDOW_MAIN(window)->dirty = TRUE;
+
window->width = width;
window->height = height;
textbuffer_view_resize(gui->view, width, height);
@@ -248,14 +254,16 @@ static void signal_window_changed(WINDOW_REC *window)
gui_window_reparent(window, active_mainwin);
}
- old_window = active_mainwin->active;
- if (old_window != NULL)
- textbuffer_view_set_window(WINDOW_GUI(old_window)->view, NULL);
+ old_window = active_mainwin->active;
+ if (old_window != NULL && old_window != window)
+ textbuffer_view_set_window(WINDOW_GUI(old_window)->view, NULL);
active_mainwin->active = window;
textbuffer_view_set_window(WINDOW_GUI(window)->view,
parent->screen_win);
+ if (WINDOW_GUI(window)->view->dirty)
+ active_mainwin->dirty = TRUE;
}
static void read_settings(void)