Module: wine Branch: master Commit: b7582525a047018b08768e6672cc2c2f64fdcce5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=b7582525a047018b08768e6672...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Oct 29 11:18:06 2012 +0100
user32: Don't flush window surfaces while waiting for a sent message reply.
---
dlls/user32/message.c | 6 ++++-- dlls/user32/winproc.c | 5 +---- 2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/dlls/user32/message.c b/dlls/user32/message.c index c1fe036..b934705 100644 --- a/dlls/user32/message.c +++ b/dlls/user32/message.c @@ -3682,8 +3682,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH PeekMessageW( MSG *msg_out, HWND hwnd, UINT first,
if (!peek_message( &msg, hwnd, first, last, flags, 0 )) { - if (flags & PM_NOYIELD) flush_window_surfaces( FALSE ); - else wow_handlers.wait_message( 0, NULL, 0, 0, 0 ); + flush_window_surfaces( !(flags & PM_NOYIELD) ); + if (!(flags & PM_NOYIELD)) wow_handlers.wait_message( 0, NULL, 0, 0, 0 ); return FALSE; }
@@ -3739,6 +3739,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetMessageW( MSG *msg, HWND hwnd, UINT first, UINT
while (!peek_message( msg, hwnd, first, last, PM_REMOVE | (mask << 16), mask )) { + flush_window_surfaces( TRUE ); wow_handlers.wait_message( 1, &server_queue, INFINITE, mask, 0 ); }
@@ -4071,6 +4072,7 @@ DWORD WINAPI MsgWaitForMultipleObjectsEx( DWORD count, CONST HANDLE *pHandles, for (i = 0; i < count; i++) handles[i] = pHandles[i]; handles[count] = get_server_queue_handle();
+ flush_window_surfaces( TRUE ); return wow_handlers.wait_message( count+1, handles, timeout, mask, flags ); }
diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c index 33afbdd..3b13b82 100644 --- a/dlls/user32/winproc.c +++ b/dlls/user32/winproc.c @@ -1124,10 +1124,7 @@ 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 ) { - DWORD ret; - - flush_window_surfaces( TRUE ); - ret = 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; }