Alexandre Julliard : user32: Always query actual key state from the server for pressed keys.
Alexandre Julliard
julliard at winehq.org
Tue Jan 17 13:45:29 CST 2012
Module: wine
Branch: master
Commit: adad80f4bd4aba325549ad8747a2951e97209660
URL: http://source.winehq.org/git/wine.git/?a=commit;h=adad80f4bd4aba325549ad8747a2951e97209660
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Jan 17 16:22:43 2012 +0100
user32: Always query actual key state from the server for pressed keys.
---
dlls/user32/input.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/user32/input.c b/dlls/user32/input.c
index 6a76cb8..abd382f 100644
--- a/dlls/user32/input.c
+++ b/dlls/user32/input.c
@@ -369,12 +369,12 @@ SHORT WINAPI DECLSPEC_HOTPATCH GetAsyncKeyState( INT key )
if ((ret = USER_Driver->pGetAsyncKeyState( key )) == -1)
{
- if (thread_info->key_state)
- {
- if (GetTickCount() - thread_info->key_state_time < 50)
- return (thread_info->key_state[key] & 0x80) ? 0x8000 : 0;
- }
- else thread_info->key_state = HeapAlloc( GetProcessHeap(), 0, 256 );
+ if (thread_info->key_state &&
+ !(thread_info->key_state[key] & 0xc0) &&
+ GetTickCount() - thread_info->key_state_time < 50)
+ return 0;
+
+ if (!thread_info->key_state) thread_info->key_state = HeapAlloc( GetProcessHeap(), 0, 256 );
ret = 0;
SERVER_START_REQ( get_key_state )
More information about the wine-cvs
mailing list