Alexandre Julliard : user32: Flush window surfaces in all functions that are used to poll for input.
Alexandre Julliard
julliard at winehq.org
Mon Oct 15 14:29:06 CDT 2012
Module: wine
Branch: master
Commit: d5244c3b242afda6c09dc95ae69b09dcde414f8d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d5244c3b242afda6c09dc95ae69b09dcde414f8d
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Oct 15 12:20:28 2012 +0200
user32: Flush window surfaces in all functions that are used to poll for input.
---
dlls/user32/input.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/dlls/user32/input.c b/dlls/user32/input.c
index 5a99201..3ca71a6 100644
--- a/dlls/user32/input.c
+++ b/dlls/user32/input.c
@@ -353,6 +353,12 @@ HWND WINAPI GetCapture(void)
}
+static void check_for_events( UINT flags )
+{
+ if (USER_Driver->pMsgWaitForMultipleObjectsEx( 0, NULL, 0, flags, 0 ) == WAIT_TIMEOUT)
+ flush_window_surfaces( TRUE );
+}
+
/**********************************************************************
* GetAsyncKeyState (USER32.@)
*
@@ -367,6 +373,8 @@ SHORT WINAPI DECLSPEC_HOTPATCH GetAsyncKeyState( INT key )
if (key < 0 || key >= 256) return 0;
+ check_for_events( QS_INPUT );
+
if ((ret = USER_Driver->pGetAsyncKeyState( key )) == -1)
{
if (thread_info->key_state &&
@@ -400,7 +408,7 @@ SHORT WINAPI DECLSPEC_HOTPATCH GetAsyncKeyState( INT key )
*/
DWORD WINAPI GetQueueStatus( UINT flags )
{
- DWORD ret = 0;
+ DWORD ret;
if (flags & ~(QS_ALLINPUT | QS_ALLPOSTMESSAGE | QS_SMRESULT))
{
@@ -408,8 +416,7 @@ DWORD WINAPI GetQueueStatus( UINT flags )
return 0;
}
- /* check for pending X events */
- USER_Driver->pMsgWaitForMultipleObjectsEx( 0, NULL, 0, flags, 0 );
+ check_for_events( flags );
SERVER_START_REQ( get_queue_status )
{
@@ -427,10 +434,9 @@ DWORD WINAPI GetQueueStatus( UINT flags )
*/
BOOL WINAPI GetInputState(void)
{
- DWORD ret = 0;
+ DWORD ret;
- /* check for pending X events */
- USER_Driver->pMsgWaitForMultipleObjectsEx( 0, NULL, 0, QS_INPUT, 0 );
+ check_for_events( QS_INPUT );
SERVER_START_REQ( get_queue_status )
{
More information about the wine-cvs
mailing list