mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-22 21:13:02 +01:00
fix help popup flickering issue on some terminals
This commit is contained in:
parent
de1e61bd5a
commit
455eba3bfd
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user