Commit 4b4b6a48 authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent b33c5f16
......@@ -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;
}
......
......@@ -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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment