Commit 4f944f7f authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

winex11.drv: Make sure keyboard state is up to date before processing GetAsyncKeyState.

parent abfe105c
......@@ -1835,8 +1835,12 @@ void X11DRV_InitKeyboard(void)
*/
SHORT X11DRV_GetAsyncKeyState(INT key)
{
SHORT retval = ((key_state_table[key] & 0x40) ? 0x0001 : 0) |
((key_state_table[key] & 0x80) ? 0x8000 : 0);
SHORT retval;
X11DRV_MsgWaitForMultipleObjectsEx( 0, NULL, 0, QS_KEY, 0 );
retval = ((key_state_table[key] & 0x40) ? 0x0001 : 0) |
((key_state_table[key] & 0x80) ? 0x8000 : 0);
key_state_table[key] &= ~0x40;
TRACE_(key)("(%x) -> %x\n", key, retval);
return retval;
......
......@@ -673,6 +673,8 @@ extern void X11DRV_send_keyboard_input( WORD wVk, WORD wScan, DWORD dwFlags, DWO
DWORD dwExtraInfo, UINT injected_flags );
extern void X11DRV_send_mouse_input( HWND hwnd, DWORD flags, DWORD x, DWORD y,
DWORD data, DWORD time, DWORD extra_info, UINT injected_flags );
extern DWORD X11DRV_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles, DWORD timeout,
DWORD mask, DWORD flags );
typedef int (*x11drv_error_callback)( Display *display, XErrorEvent *event, void *arg );
......
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