]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
flush input when drawing a new window
authorewt <ewt>
Mon, 17 Mar 1997 16:55:44 +0000 (16:55 +0000)
committerewt <ewt>
Mon, 17 Mar 1997 16:55:44 +0000 (16:55 +0000)
newt.c

diff --git a/newt.c b/newt.c
index 86eeecda0ab6a434e93b5038b4b9cd62792f8d16..db17b3f3cc07bab8ad0aceb93b5ede90e6e932e1 100644 (file)
--- a/newt.c
+++ b/newt.c
@@ -113,6 +113,12 @@ void newtSetSuspendCallback(newtSuspendCallback cb) {
     suspendCallback = cb;
 }
 
+void newtFlushInput(void) {
+    while (SLang_input_pending(0)) {
+       SLang_getkey();
+    }
+}
+
 void newtRefresh(void) {
     SLsmg_refresh();
 }
@@ -296,6 +302,8 @@ int newtOpenWindow(int left, int top, int width, int height,
     int i, j, row, col;
     int n;
 
+    newtFlushInput();
+
     if (!currentWindow) {
        currentWindow = windowStack;
     } else {