1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-30 19:46:46 +02:00

add popup alert on friend delete

This commit is contained in:
Jfreegman
2014-03-08 23:57:21 -05:00
parent 33e16fe870
commit fe0641e981
5 changed files with 73 additions and 7 deletions

View File

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