Remove internal messages from the message queue before handling them

Michael Kaufmann hallo at michael-kaufmann.ch
Sun Jan 29 06:36:44 CST 2006


Word 95 always crashed when closing its main window because of this bug.

Changelog:
Remove internal messages from the message queue before handling them
-------------- next part --------------
Index: dlls/user/message.c
===================================================================
RCS file: /home/wine/wine/dlls/user/message.c,v
retrieving revision 1.99
diff -u -r1.99 message.c
--- dlls/user/message.c	17 Jan 2006 12:40:00 -0000	1.99
+++ dlls/user/message.c	29 Jan 2006 11:30:05 -0000
@@ -2728,9 +2728,14 @@
         }
         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-patches mailing list