mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 05:53:02 +01:00
allow friendlist to be resized properly
This commit is contained in:
parent
a968ca2a2e
commit
3e22c9b829
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user