From 716490f0c2a66464638f25cafed4dd3f22452865 Mon Sep 17 00:00:00 2001 From: Andrew Innes Date: Thu, 1 Jul 1999 19:48:55 +0000 Subject: [PATCH] (drain_message_queue): New function. --- src/w32xfns.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 -- 2.39.2