user32: Use the wait message handler for the yield in PeekMessageW too.

This commit is contained in:
Alexandre Julliard 2009-12-24 12:03:45 +01:00
parent b33c5f163a
commit 4b4b6a48cb
2 changed files with 4 additions and 8 deletions

View File

@ -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;
}

View File

@ -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 )