From 3e22c9b8297f047635f5f98a5f0ee6bf67de593e Mon Sep 17 00:00:00 2001 From: Jfreegman Date: Tue, 1 Jul 2014 01:17:31 -0400 Subject: [PATCH] allow friendlist to be resized properly --- src/windows.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/windows.c b/src/windows.c index 48e710b..ebe7b20 100644 --- a/src/windows.c +++ b/src/windows.c @@ -318,10 +318,17 @@ void on_window_resize(void) int i; for (i == 0; i < MAX_WINDOWS_NUM; ++i) { - if (!windows[i].active || windows[i].is_friendlist) + if (!windows[i].active) continue; ToxWindow *w = &windows[i]; + + if (windows[i].is_friendlist) { + delwin(w->window); + w->window = newwin(LINES - 2, COLS, 0, 0); + continue; + } + ChatContext *ctx = w->chatwin; if (w->is_groupchat) @@ -337,7 +344,7 @@ void on_window_resize(void) int x2, y2, x, y; getmaxyx(w->window, y2, x2); - getyx(w->window, y, x); + getyx(w->window, y, x); /* don't remove this */ w->x = x2; ctx = w->chatwin;