summaryrefslogtreecommitdiff
path: root/src/fe-text/mainwindows.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-12-07 23:20:23 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-12-07 23:20:23 +0000
commit1b8a5a866dbd45f322629931ab4b1a5bf2cf27c4 (patch)
treedda68d006ffb127c5b2f5175aee1e2a346100053 /src/fe-text/mainwindows.c
parent9b08e5c640dc39bda97ca68334a88affb0efb1e5 (diff)
downloadirssi-1b8a5a866dbd45f322629931ab4b1a5bf2cf27c4.zip
Fixed some problems with mainwindow resizing not affecting the subwindows.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2219 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text/mainwindows.c')
-rw-r--r--src/fe-text/mainwindows.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/fe-text/mainwindows.c b/src/fe-text/mainwindows.c
index 4308acef..eab07289 100644
--- a/src/fe-text/mainwindows.c
+++ b/src/fe-text/mainwindows.c
@@ -71,26 +71,32 @@ static MAIN_WINDOW_REC *find_window_with_room(void)
return biggest_rec;
}
+#define window_size_equals(window, mainwin) \
+ ((window)->width == (mainwin)->width && \
+ (window)->height == MAIN_WINDOW_TEXT_HEIGHT(mainwin))
+
static void mainwindow_resize_windows(MAIN_WINDOW_REC *window)
{
GSList *tmp;
+ int resized;
mainwindow_set_screen_size(window);
- if (window->active->width == window->width &&
- window->active->height == MAIN_WINDOW_TEXT_HEIGHT(window))
- return;
+ resized = FALSE;
for (tmp = windows; tmp != NULL; tmp = tmp->next) {
WINDOW_REC *rec = tmp->data;
if (rec->gui_data != NULL &&
- WINDOW_GUI(rec)->parent == window) {
+ WINDOW_GUI(rec)->parent == window &&
+ !window_size_equals(rec, window)) {
+ resized = TRUE;
gui_window_resize(rec, window->width,
MAIN_WINDOW_TEXT_HEIGHT(window));
}
}
- signal_emit("mainwindow resized", 1, window);
+ if (resized)
+ signal_emit("mainwindow resized", 1, window);
}
static void mainwindow_resize(MAIN_WINDOW_REC *window, int xdiff, int ydiff)
@@ -147,7 +153,7 @@ void mainwindow_change_active(MAIN_WINDOW_REC *mainwin,
WINDOW_REC *rec = tmp->data;
if (rec != skip_window && WINDOW_MAIN(rec) == mainwin) {
- window_set_active(rec);
+ window_set_active(rec);
break;
}
}