Jacek Caban : ole32: Don' t dispatch WM_QUIT messages in CoWaitForMultipleHandles.

Alexandre Julliard julliard at winehq.org
Tue Jan 23 16:09:49 CST 2018


Module: wine
Branch: master
Commit: 98b44e793aa1cc3ab3c81b95c1a50e28cdfba869
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=98b44e793aa1cc3ab3c81b95c1a50e28cdfba869

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Jan 22 17:05:40 2018 +0100

ole32: Don't dispatch WM_QUIT messages in CoWaitForMultipleHandles.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ole32/compobj.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c
index 08455bf..d002887 100644
--- a/dlls/ole32/compobj.c
+++ b/dlls/ole32/compobj.c
@@ -4559,18 +4559,21 @@ HRESULT WINAPI CoWaitForMultipleHandles(DWORD dwFlags, DWORD dwTimeout,
                  * so after processing 100 messages we go back to checking the wait handles */
                 while (count++ < 100 && COM_PeekMessage(apt, &msg))
                 {
-                    TRACE("received message whilst waiting for RPC: 0x%04x\n", msg.message);
-                    TranslateMessage(&msg);
-                    DispatchMessageW(&msg);
                     if (msg.message == WM_QUIT)
                     {
-                        TRACE("resending WM_QUIT to outer message loop\n");
+                        TRACE("received WM_QUIT message\n");
                         post_quit = TRUE;
                         exit_code = msg.wParam;
                         /* no longer need to process messages */
                         message_loop = FALSE;
                         break;
                     }
+                    else
+                    {
+                        TRACE("received message whilst waiting for RPC: 0x%04x\n", msg.message);
+                        TranslateMessage(&msg);
+                        DispatchMessageW(&msg);
+                    }
                 }
                 continue;
             }




More information about the wine-cvs mailing list