Michael Kaufmann : user: Remove internal messages from the message queue before handling them.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jan 30 12:44:58 CST 2006


Module: wine
Branch: refs/heads/master
Commit: fd71ef1bfae7061b22ae5da0031052f50fe9d61d
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=fd71ef1bfae7061b22ae5da0031052f50fe9d61d

Author: Michael Kaufmann <hallo at michael-kaufmann.ch>
Date:   Mon Jan 30 18:15:52 2006 +0100

user: Remove internal messages from the message queue before handling them.

---

 dlls/user/message.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/dlls/user/message.c b/dlls/user/message.c
index 99d1748..2a1a9d9 100644
--- a/dlls/user/message.c
+++ b/dlls/user/message.c
@@ -2728,9 +2728,14 @@ BOOL WINAPI PeekMessageW( MSG *msg_out, 
         }
         if (msg.message & 0x80000000)
         {
-            handle_internal_message( msg.hwnd, msg.message, msg.wParam, msg.lParam );
-            if (!(flags & PM_REMOVE))  /* have to remove it explicitly */
+            if (!(flags & PM_REMOVE))
+            {
+                /* Have to remove the message explicitly.
+                   Do this before handling it, because the message handler may
+                   call PeekMessage again */
                 peek_message( &msg, msg.hwnd, msg.message, msg.message, GET_MSG_REMOVE );
+            }
+            handle_internal_message( msg.hwnd, msg.message, msg.wParam, msg.lParam );
         }
         else break;
     }




More information about the wine-cvs mailing list