aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils.c
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@calcurse.org>2017-09-03 16:30:39 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2017-09-03 16:37:35 +0200
commit53f0f1d2e375ed800fe9235d359a119f0eee592e (patch)
tree024fb7cdb29e35df2c9d9c75a6f981d1d7dbba87 /src/utils.c
parent8373ecfe5137a42035ce472eb47e84391b10a2c4 (diff)
downloadcalcurse-53f0f1d2e375ed800fe9235d359a119f0eee592e.tar.gz
calcurse-53f0f1d2e375ed800fe9235d359a119f0eee592e.zip
Add a function to wait for any key press
Introduce a new function keys_wait_for_any_key() and use it instead of wgetch() whenever the return value is discarded. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils.c b/src/utils.c
index 4719add..e922997 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -145,7 +145,7 @@ void fatalbox(const char *errmsg)
mvwaddstr(errwin, 5, (WINCOL - strlen(msg)) / 2, msg);
custom_remove_attr(errwin, ATTR_HIGHEST);
wins_wrefresh(errwin);
- wgetch(errwin);
+ keys_wait_for_any_key(errwin);
delwin(errwin);
wins_doupdate();
}
@@ -172,7 +172,7 @@ void warnbox(const char *msg)
mvwaddstr(warnwin, 5, (WINCOL - strlen(displmsg)) / 2, displmsg);
custom_remove_attr(warnwin, ATTR_HIGHEST);
wins_wrefresh(warnwin);
- wgetch(warnwin);
+ keys_wait_for_any_key(warnwin);
delwin(warnwin);
wins_doupdate();
}
@@ -614,7 +614,7 @@ item_in_popup(const char *a_start, const char *a_end, const char *msg,
wmove(win[STA].p, 0, 0);
pnoutrefresh(pad, 0, 0, margin_top + 2, margin_left, padl, winw);
wins_doupdate();
- wgetch(popup_win);
+ keys_wait_for_any_key(popup_win);
delwin(pad);
delwin(popup_win);
}