From: ewt Date: Mon, 17 Mar 1997 16:55:44 +0000 (+0000) Subject: flush input when drawing a new window X-Git-Tag: v0-9~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=327436b3772fe7ff392cf3c729d1c401967fa29f;p=thirdparty%2Fnewt.git flush input when drawing a new window --- diff --git a/newt.c b/newt.c index 86eeecd..db17b3f 100644 --- 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 {