1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-23 02:13:01 +01:00

fix help popup flickering issue on some terminals

This commit is contained in:
Jfreegman 2014-07-05 14:46:16 -04:00
parent de1e61bd5a
commit 455eba3bfd
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63
6 changed files with 13 additions and 11 deletions

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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:

View File

@ -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)

View File

@ -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;