diff --git a/src/prompt.c b/src/prompt.c index 552d6e1..42bf76c 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -69,7 +69,8 @@ const char glob_cmd_list[AC_NUM_GLOB_COMMANDS][MAX_CMDNAME_SIZE] = { #endif /* _SUPPORT_AUDIO */ }; -void kill_prompt_window(ToxWindow *self) { +void kill_prompt_window(ToxWindow *self) +{ ChatContext *ctx = self->chatwin; StatusBar *statusbar = self->stb; diff --git a/src/toxic.c b/src/toxic.c index e5b6c10..b3b46fe 100644 --- a/src/toxic.c +++ b/src/toxic.c @@ -321,7 +321,7 @@ int init_connection(Tox *m) return 4; } -#define TRY_CONNECT 10 +#define TRY_CONNECT 10 /* Seconds between connection attempts when DHT is not connected */ static void do_connection(Tox *m, ToxWindow *prompt) { diff --git a/src/windows.c b/src/windows.c index fc608dc..1880e1a 100644 --- a/src/windows.c +++ b/src/windows.c @@ -326,11 +326,11 @@ void on_window_resize(void) ToxWindow *w = &windows[i]; - delwin(w->window); - w->window = newwin(y2, x2, 0, 0); - - if (windows[i].is_friendlist) + if (windows[i].is_friendlist) { + delwin(w->window); + w->window = newwin(y2, x2, 0, 0); continue; + } if (w->help->active) wclear(w->help->win); @@ -342,7 +342,9 @@ void on_window_resize(void) delwin(w->chatwin->linewin); delwin(w->chatwin->history); + delwin(w->window); + w->window = newwin(y2, x2, 0, 0); w->chatwin->linewin = subwin(w->window, CHATBOX_HEIGHT, x2, y2 - CHATBOX_HEIGHT, 0); if (w->is_groupchat) { @@ -358,7 +360,7 @@ void on_window_resize(void) delwin(w->chatwin->infobox.win); w->chatwin->infobox.win = newwin(INFOBOX_HEIGHT, INFOBOX_WIDTH + 1, 1, x2 - INFOBOX_WIDTH); } -#endif /* _SUPPORT_AUDIO */ +#endif /* _SUPPORT_AUDIO */ scrollok(w->chatwin->history, 0); }