1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-29 10:16:45 +02:00

simplify popup drawing

This commit is contained in:
Jfreegman
2014-03-09 01:02:54 -05:00
parent fe0641e981
commit d08feb2cc5
3 changed files with 10 additions and 16 deletions

View File

@ -387,14 +387,8 @@ void draw_active_window(Tox *m)
wresize(a->window, LINES - 2, COLS);
#endif
/* ignore main window if popup is active */
if (a->popup) {
a->onPopup(a, m);
wrefresh(a->popup);
} else {
a->onDraw(a, m);
wrefresh(a->window);
}
a->onDraw(a, m);
wrefresh(a->window);
/* Handle input */
#ifdef HAVE_WIDECHAR
@ -403,7 +397,7 @@ void draw_active_window(Tox *m)
ch = getch();
#endif
if ((ch == T_KEY_NEXT || ch == T_KEY_PREV) && !a->popup) /* lock window if active popup */
if (ch == T_KEY_NEXT || ch == T_KEY_PREV)
set_next_window((int) ch);
else if (ch != ERR)
a->onKey(a, m, ch);