diff --git a/src/chat.c b/src/chat.c index 18e2672..9518647 100644 --- a/src/chat.c +++ b/src/chat.c @@ -543,10 +543,6 @@ void chat_onPeerTimeout (ToxWindow *self, ToxAv *av, int call_index) line_info_add(self, NULL, NULL, NULL, "Peer disconnected; call ended!", SYS_MSG, 0, 0); } - -#define INFOBOX_HEIGHT 7 -#define INFOBOX_WIDTH 21 - static void init_infobox(ToxWindow *self) { ChatContext *ctx = self->chatwin; diff --git a/src/windows.c b/src/windows.c index ebe7b20..597889f 100644 --- a/src/windows.c +++ b/src/windows.c @@ -358,6 +358,15 @@ void on_window_resize(void) w->stb->topline = subwin(w->window, 2, x2, 0, 0); } +#ifdef _SUPPORT_AUDIO + + if (ctx->infobox.active) { + delwin(ctx->infobox.win); + ctx->infobox.win = newwin(INFOBOX_HEIGHT, INFOBOX_WIDTH + 1, 1, x2 - INFOBOX_WIDTH); + } + +#endif /* #ifdef _SUPPORT_AUDIO */ + scrollok(ctx->history, 0); } } diff --git a/src/windows.h b/src/windows.h index b346aa0..52e96fd 100644 --- a/src/windows.h +++ b/src/windows.h @@ -147,6 +147,10 @@ struct StatusBar { }; #ifdef _SUPPORT_AUDIO + + +#define INFOBOX_HEIGHT 7 +#define INFOBOX_WIDTH 21 /* holds display info for audio calls */ struct infobox { float vad_lvl; @@ -161,7 +165,7 @@ struct infobox { WINDOW *win; }; -#endif +#endif /* _SUPPORT_AUDIO */ #define MAX_LINE_HIST 128