From: Andrew Innes Date: Thu, 1 Jul 1999 19:48:55 +0000 (+0000) Subject: (drain_message_queue): New function. X-Git-Tag: emacs-20.4~32 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=716490f0c2a66464638f25cafed4dd3f22452865;p=emacs.git (drain_message_queue): New function. --- diff --git a/src/w32xfns.c b/src/w32xfns.c index 7c61b241520..617eec7841b 100644 --- a/src/w32xfns.c +++ b/src/w32xfns.c @@ -239,6 +239,19 @@ prepend_msg (W32Msg *lpmsg) return (TRUE); } +/* Process all messages in the current thread's queue. */ +void +drain_message_queue () +{ + MSG msg; + while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE)) + { + TranslateMessage (&msg); + DispatchMessage (&msg); + } +} + + /* * XParseGeometry parses strings of the form * "=x{+-}{+-}", where