[Bug 5623] GetAsyncKeyState wrong if querying process doesn't have focus

wine-bugs at winehq.org wine-bugs at winehq.org
Tue May 6 14:40:53 CDT 2008


http://bugs.winehq.org/show_bug.cgi?id=5623





--- Comment #15 from Rafa³ Mi³ecki <zajec5 at gmail.com>  2008-05-06 14:40:53 ---
I have some tip for interested developer. This is how I see this problem,
please note I may be wrong at some point. I try to make fixing this bug as
simply as possible. Unfortunately I still can not do it myself.


Function GetAsyncKeyState can be found in dlls/user32/input.c and is quite
trivial:
SHORT WINAPI GetAsyncKeyState(INT nKey)
{
    return USER_Driver->pGetAsyncKeyState( nKey );
}


More interesting place for us is dlls/winex11.drv/keyboard.c where we can find
theses two interesting functions:
KEYBOARD_UpdateOneState ( WORD vkey, WORD scan, int state, DWORD time )
X11DRV_GetAsyncKeyState(INT key)


We need to add variable very similar (100% simialar?) to key_state_table
variable into wineserver. That will be variable shared between all the
processes runned on the same wineserver. I think name like
async_key_state_table would be nice.


Then we have to add changing async_key_state_table in KEYBOARD_UpdateOneState
body. After that the last thing should be changing X11DRV_GetAsyncKeyState body
to make this function use async_key_state_table instead of key_state_table.


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the wine-bugs mailing list