tHave bgetch() under Unix ignore KEY_RESIZE and ERR returns from getch(), so th… | |
git clone git://src.adamsgaard.dk/vaccinewars | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 574051390dc6bfb24f9cf35c036d069c357b3a3c | |
parent b23da53b00549c97cfb60fb8bcea0eee0ec06ef4 | |
Author: Ben Webb <[email protected]> | |
Date: Sun, 26 Jan 2003 19:35:22 +0000 | |
Have bgetch() under Unix ignore KEY_RESIZE and ERR returns from getch(), | |
so that resizing the window doesn't cancel any "press any key" prompts or | |
tthe like. | |
Diffstat: | |
M src/cursesport/cursesport.c | 4 +++- | |
1 file changed, 3 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/src/cursesport/cursesport.c b/src/cursesport/cursesport.c | |
t@@ -253,7 +253,9 @@ int bgetch() | |
int c; | |
c = getch(); | |
- while (c == '\f') { | |
+ /* N.B. Ignore ERR, which seems to be sometimes generated by screen | |
+ * resize events; we deal with these by trapping SIGWINCH instead */ | |
+ while (c == '\f' || c == KEY_RESIZE || c == ERR) { | |
wrefresh(curscr); | |
c = getch(); | |
} |