diff --git a/src/chat.c b/src/chat.c index e8a2f7a..95075d2 100644 --- a/src/chat.c +++ b/src/chat.c @@ -836,9 +836,9 @@ static void chat_onDraw(ToxWindow *self, Tox *m) int new_x = ctx->start ? x2 - 1 : ctx->pos; wmove(self->window, y + 1, new_x); -#ifdef _SUPPORT_AUDIO wrefresh(self->window); +#ifdef _SUPPORT_AUDIO if (ctx->infobox.active) draw_infobox(self); #endif diff --git a/src/friendlist.c b/src/friendlist.c index cc7cda8..de48af4 100644 --- a/src/friendlist.c +++ b/src/friendlist.c @@ -522,8 +522,6 @@ static void friendlist_onDraw(ToxWindow *self, Tox *m) } self->x = x2; - wrefresh(self->window); - draw_popup(); if (num_friends) { wmove(self->window, y2 - 1, 1); @@ -537,6 +535,9 @@ static void friendlist_onDraw(ToxWindow *self, Tox *m) for (i = 0; i < TOX_CLIENT_ID_SIZE; ++i) wprintw(self->window, "%02X", friends[selected_num].pub_key[i] & 0xff); } + + wrefresh(self->window); + draw_popup(); } void disable_chatwin(int32_t f_num) diff --git a/src/groupchat.c b/src/groupchat.c index df792b5..bee1bf9 100644 --- a/src/groupchat.c +++ b/src/groupchat.c @@ -486,10 +486,10 @@ static void groupchat_onDraw(ToxWindow *self, Tox *m) int new_x = ctx->start ? x2 - 1 : ctx->pos; wmove(self->window, y + 1, new_x); - if (self->help->active) { - wrefresh(self->window); + wrefresh(self->window); + + if (self->help->active) help_onDraw(self); - } } static void groupchat_onInit(ToxWindow *self, Tox *m) diff --git a/src/help.c b/src/help.c index 162ba6c..3977135 100644 --- a/src/help.c +++ b/src/help.c @@ -256,7 +256,6 @@ void help_onKey(ToxWindow *self, wint_t key) void help_onDraw(ToxWindow *self) { curs_set(0); - wclear(self->help->win); switch(self->help->type) { case HELP_MENU: diff --git a/src/prompt.c b/src/prompt.c index c45b89a..1c23eeb 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -255,10 +255,10 @@ static void prompt_onDraw(ToxWindow *self, Tox *m) int new_x = ctx->start ? x2 - 1 : ctx->pos; wmove(self->window, y + 1, new_x); - if (self->help->active) { - wrefresh(self->window); + wrefresh(self->window); + + if (self->help->active) help_onDraw(self); - } } static void prompt_onConnectionChange(ToxWindow *self, Tox *m, int32_t friendnum , uint8_t status) diff --git a/src/windows.c b/src/windows.c index afacb00..489ebe0 100644 --- a/src/windows.c +++ b/src/windows.c @@ -334,6 +334,9 @@ void on_window_resize(void) if (windows[i].is_friendlist) continue; + if (w->help->active) + wclear(w->help->win); + if (w->is_groupchat) delwin(w->chatwin->sidebar); else @@ -439,7 +442,6 @@ void draw_active_window(Tox *m) touchwin(a->window); a->onDraw(a, m); - wrefresh(a->window); /* Handle input */ bool ltr;