Alexandre Julliard : user32: Use the wait message handler for the yield in PeekMessageW too.
Alexandre Julliard
julliard at winehq.org
Thu Dec 24 10:27:16 CST 2009
Module: wine
Branch: master
Commit: 4b4b6a48cb49465319f8c9838d463e34abfa5ce9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4b4b6a48cb49465319f8c9838d463e34abfa5ce9
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Dec 24 12:03:45 2009 +0100
user32: Use the wait message handler for the yield in PeekMessageW too.
---
dlls/user32/message.c | 8 +-------
dlls/user32/winproc.c | 4 +++-
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/dlls/user32/message.c b/dlls/user32/message.c
index 48c8068..d85eabb 100644
--- a/dlls/user32/message.c
+++ b/dlls/user32/message.c
@@ -2887,13 +2887,7 @@ BOOL WINAPI PeekMessageW( MSG *msg_out, HWND hwnd, UINT first, UINT last, UINT f
if (!peek_message( &msg, hwnd, first, last, flags, 0 ))
{
- if (!(flags & PM_NOYIELD))
- {
- DWORD count;
- ReleaseThunkLock(&count);
- NtYieldExecution();
- if (count) RestoreThunkLock(count);
- }
+ if (!(flags & PM_NOYIELD)) wow_handlers.wait_message( 0, NULL, 0, 0, 0 );
return FALSE;
}
diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c
index c73a40e..396ae87 100644
--- a/dlls/user32/winproc.c
+++ b/dlls/user32/winproc.c
@@ -1123,7 +1123,9 @@ static LRESULT WINAPI StaticWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM
static DWORD wait_message( DWORD count, CONST HANDLE *handles, DWORD timeout, DWORD mask, DWORD flags )
{
- return USER_Driver->pMsgWaitForMultipleObjectsEx( count, handles, timeout, mask, flags );
+ DWORD ret = USER_Driver->pMsgWaitForMultipleObjectsEx( count, handles, timeout, mask, flags );
+ if (ret == WAIT_TIMEOUT && !count && !timeout) NtYieldExecution();
+ return ret;
}
static HICON alloc_icon_handle( unsigned int size )
More information about the wine-cvs
mailing list