[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-patches
Subject: [OLE #92] Handle WM_QUIT Message in OLE Modal Loops
From: Robert Shearman <rob () codeweavers ! com>
Date: 2005-05-31 20:40:57
Message-ID: 429CCBD9.7010600 () codeweavers ! com
[Download RAW message or body]
Hi,
I would imagine that most of the modal loops in Wine have this problem,
but I have only patch the ole32 directory so far.
Changelog:
Handle WM_QUIT message in OLE modal loops.
--
Rob Shearman
["ole92.diff" (text/x-patch)]
Index: dlls/ole32/compobj.c
===================================================================
RCS file: /home/wine/wine/dlls/ole32/compobj.c,v
retrieving revision 1.151
diff -u -p -r1.151 compobj.c
--- dlls/ole32/compobj.c 16 May 2005 14:12:53 -0000 1.151
+++ dlls/ole32/compobj.c 31 May 2005 20:38:44 -0000
@@ -33,7 +33,6 @@
* - Implement the OXID resolver so we don't need magic endpoint names for
* clients and servers to meet up
*
- * - Pump the message loop during RPC calls.
* - Call IMessageFilter functions.
*
* - Make all ole interface marshaling use NDR to be wire compatible with
@@ -2627,12 +2626,21 @@ HRESULT WINAPI CoWaitForMultipleHandles(
if (res == WAIT_OBJECT_0 + cHandles) /* messages available */
{
MSG msg;
+ memset(&msg, 0, sizeof(msg));
+
while (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE))
{
/* FIXME: filter the messages here */
TRACE("received message whilst waiting for RPC: 0x%04x\n", msg.message);
TranslateMessage(&msg);
DispatchMessageW(&msg);
+ }
+
+ /* re-post the quit message to outer message loop */
+ if (msg.message == WM_QUIT)
+ {
+ PostQuitMessage(msg.wParam);
+ break;
}
}
else if ((res >= WAIT_OBJECT_0) && (res < WAIT_OBJECT_0 + cHandles))
Index: dlls/ole32/ole2.c
===================================================================
RCS file: /home/wine/wine/dlls/ole32/ole2.c,v
retrieving revision 1.67
diff -u -p -r1.67 ole2.c
--- dlls/ole32/ole2.c 17 May 2005 10:18:59 -0000 1.67
+++ dlls/ole32/ole2.c 31 May 2005 20:38:45 -0000
@@ -534,6 +534,8 @@ HRESULT WINAPI DoDragDrop (
*/
SetCapture(hwndTrackWindow);
+ memset(&msg, 0, sizeof(msg));
+
/*
* Pump messages. All mouse input should go the the capture window.
*/
@@ -570,6 +572,9 @@ HRESULT WINAPI DoDragDrop (
}
}
+ /* re-post the quit message to outer message loop */
+ if (msg.message == WM_QUIT)
+ PostQuitMessage(msg.wParam);
/*
* Destroy the temporary window.
*/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic