1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-26 22:53:28 +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; int new_x = ctx->start ? x2 - 1 : ctx->pos;
wmove(self->window, y + 1, new_x); wmove(self->window, y + 1, new_x);
#ifdef _SUPPORT_AUDIO
wrefresh(self->window); wrefresh(self->window);
#ifdef _SUPPORT_AUDIO
if (ctx->infobox.active) if (ctx->infobox.active)
draw_infobox(self); draw_infobox(self);
#endif #endif

View File

@ -522,8 +522,6 @@ static void friendlist_onDraw(ToxWindow *self, Tox *m)
} }
self->x = x2; self->x = x2;
wrefresh(self->window);
draw_popup();
if (num_friends) { if (num_friends) {
wmove(self->window, y2 - 1, 1); 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) for (i = 0; i < TOX_CLIENT_ID_SIZE; ++i)
wprintw(self->window, "%02X", friends[selected_num].pub_key[i] & 0xff); wprintw(self->window, "%02X", friends[selected_num].pub_key[i] & 0xff);
} }
wrefresh(self->window);
draw_popup();
} }
void disable_chatwin(int32_t f_num) void disable_chatwin(int32_t f_num)

View File

@ -486,11 +486,11 @@ static void groupchat_onDraw(ToxWindow *self, Tox *m)
int new_x = ctx->start ? x2 - 1 : ctx->pos; int new_x = ctx->start ? x2 - 1 : ctx->pos;
wmove(self->window, y + 1, new_x); wmove(self->window, y + 1, new_x);
if (self->help->active) {
wrefresh(self->window); wrefresh(self->window);
if (self->help->active)
help_onDraw(self); help_onDraw(self);
} }
}
static void groupchat_onInit(ToxWindow *self, Tox *m) 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) void help_onDraw(ToxWindow *self)
{ {
curs_set(0); curs_set(0);
wclear(self->help->win);
switch(self->help->type) { switch(self->help->type) {
case HELP_MENU: case HELP_MENU:

View File

@ -255,11 +255,11 @@ static void prompt_onDraw(ToxWindow *self, Tox *m)
int new_x = ctx->start ? x2 - 1 : ctx->pos; int new_x = ctx->start ? x2 - 1 : ctx->pos;
wmove(self->window, y + 1, new_x); wmove(self->window, y + 1, new_x);
if (self->help->active) {
wrefresh(self->window); wrefresh(self->window);
if (self->help->active)
help_onDraw(self); help_onDraw(self);
} }
}
static void prompt_onConnectionChange(ToxWindow *self, Tox *m, int32_t friendnum , uint8_t status) 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) if (windows[i].is_friendlist)
continue; continue;
if (w->help->active)
wclear(w->help->win);
if (w->is_groupchat) if (w->is_groupchat)
delwin(w->chatwin->sidebar); delwin(w->chatwin->sidebar);
else else
@ -439,7 +442,6 @@ void draw_active_window(Tox *m)
touchwin(a->window); touchwin(a->window);
a->onDraw(a, m); a->onDraw(a, m);
wrefresh(a->window);
/* Handle input */ /* Handle input */
bool ltr; bool ltr;