Commit 841214dd authored by Alexandre Julliard's avatar Alexandre Julliard

user32: Don't check for driver events before normal messages in PeekMessage.

parent 8ba4c316
...@@ -3681,14 +3681,19 @@ BOOL WINAPI DECLSPEC_HOTPATCH PeekMessageW( MSG *msg_out, HWND hwnd, UINT first, ...@@ -3681,14 +3681,19 @@ BOOL WINAPI DECLSPEC_HOTPATCH PeekMessageW( MSG *msg_out, HWND hwnd, UINT first,
USER_CheckNotLock(); USER_CheckNotLock();
/* check for graphics events */
USER_Driver->pMsgWaitForMultipleObjectsEx( 0, NULL, 0, QS_ALLINPUT, 0 );
if (!peek_message( &msg, hwnd, first, last, flags, 0 )) if (!peek_message( &msg, hwnd, first, last, flags, 0 ))
{ {
DWORD ret;
flush_window_surfaces( !(flags & PM_NOYIELD) ); flush_window_surfaces( !(flags & PM_NOYIELD) );
if (!(flags & PM_NOYIELD)) wow_handlers.wait_message( 0, NULL, 0, 0, 0 );
return FALSE; if (flags & PM_NOYIELD)
ret = USER_Driver->pMsgWaitForMultipleObjectsEx( 0, NULL, 0, QS_ALLINPUT, 0 );
else
ret = wow_handlers.wait_message( 0, NULL, 0, 0, 0 );
/* if we received driver events, check again for a pending message */
if (ret == WAIT_TIMEOUT || !peek_message( &msg, hwnd, first, last, flags, 0 )) return FALSE;
} }
/* copy back our internal safe copy of message data to msg_out. /* copy back our internal safe copy of message data to msg_out.
......
...@@ -6795,6 +6795,7 @@ static void test_interthread_messages(void) ...@@ -6795,6 +6795,7 @@ static void test_interthread_messages(void)
wnd_event.hwnd = CreateWindowExA(0, "TestParentClass", "Test parent", WS_OVERLAPPEDWINDOW | WS_VISIBLE, wnd_event.hwnd = CreateWindowExA(0, "TestParentClass", "Test parent", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
100, 100, 200, 200, 0, 0, 0, NULL); 100, 100, 200, 200, 0, 0, 0, NULL);
ok (wnd_event.hwnd != 0, "Failed to create parent window\n"); ok (wnd_event.hwnd != 0, "Failed to create parent window\n");
flush_events();
flush_sequence(); flush_sequence();
log_all_parent_messages++; log_all_parent_messages++;
wnd_event.start_event = CreateEventA( NULL, TRUE, FALSE, NULL ); wnd_event.start_event = CreateEventA( NULL, TRUE, FALSE, NULL );
......
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