From 03d377eae78243b26df2dbfb32faf8324335a513 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 17 Aug 2012 10:06:41 +0200 Subject: [PATCH] winex11: Release the keyboard lock before sending input to the server. --- dlls/winex11.drv/keyboard.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c index 2ccacb7050c..ae7e72b8bf7 100644 --- a/dlls/winex11.drv/keyboard.c +++ b/dlls/winex11.drv/keyboard.c @@ -1417,18 +1417,17 @@ void X11DRV_KeyEvent( HWND hwnd, XEvent *xev ) TRACE_(key)("keycode %u converted to vkey 0x%X scan %02x\n", event->keycode, vkey, bScan); - if (vkey) - { - dwFlags = 0; - if ( event->type == KeyRelease ) dwFlags |= KEYEVENTF_KEYUP; - if ( vkey & 0x100 ) dwFlags |= KEYEVENTF_EXTENDEDKEY; + LeaveCriticalSection( &kbd_section ); - update_lock_state( hwnd, vkey, event->state, event_time ); + if (!vkey) return; - X11DRV_send_keyboard_input( hwnd, vkey & 0xff, bScan, dwFlags, event_time ); - } - LeaveCriticalSection( &kbd_section ); + dwFlags = 0; + if ( event->type == KeyRelease ) dwFlags |= KEYEVENTF_KEYUP; + if ( vkey & 0x100 ) dwFlags |= KEYEVENTF_EXTENDEDKEY; + + update_lock_state( hwnd, vkey, event->state, event_time ); + X11DRV_send_keyboard_input( hwnd, vkey & 0xff, bScan, dwFlags, event_time ); } /********************************************************************** -- 2.11.4.GIT