1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-13 02:33:03 +01:00

allow friendlist to be resized properly

This commit is contained in:
Jfreegman 2014-07-01 01:17:31 -04:00
parent a968ca2a2e
commit 3e22c9b829
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63

View File

@ -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;