Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/wineandroid.drv/keyboard.c | 23 +++++++++++++---------- dlls/wineandroid.drv/window.c | 31 +++++++++++++++++++++++++++++-- 2 files changed, 42 insertions(+), 12 deletions(-)
diff --git a/dlls/wineandroid.drv/keyboard.c b/dlls/wineandroid.drv/keyboard.c index 2c37c42e0d4..5c9ed2442df 100644 --- a/dlls/wineandroid.drv/keyboard.c +++ b/dlls/wineandroid.drv/keyboard.c @@ -671,16 +671,19 @@ static BOOL get_async_key_state( BYTE state[256] )
static void send_keyboard_input( HWND hwnd, WORD vkey, WORD scan, DWORD flags ) { - INPUT input; - - input.type = INPUT_KEYBOARD; - input.u.ki.wVk = vkey; - input.u.ki.wScan = scan; - input.u.ki.dwFlags = flags; - input.u.ki.time = 0; - input.u.ki.dwExtraInfo = 0; - - __wine_send_input( hwnd, &input ); + SERVER_START_REQ( send_hardware_message ) + { + req->win = wine_server_user_handle( hwnd ); + req->flags = 0; + req->input.type = INPUT_KEYBOARD; + req->input.kbd.vkey = vkey; + req->input.kbd.scan = scan; + req->input.kbd.flags = flags; + req->input.kbd.time = 0; + req->input.kbd.info = 0; + wine_server_call( req ); + } + SERVER_END_REQ; }
/*********************************************************************** diff --git a/dlls/wineandroid.drv/window.c b/dlls/wineandroid.drv/window.c index eb05aaf2832..2b757636847 100644 --- a/dlls/wineandroid.drv/window.c +++ b/dlls/wineandroid.drv/window.c @@ -521,7 +521,21 @@ static int process_events( DWORD mask ) } SERVER_END_REQ; } - __wine_send_input( capture ? capture : event->data.motion.hwnd, &event->data.motion.input ); + + SERVER_START_REQ( send_hardware_message ) + { + req->win = wine_server_user_handle( capture ? capture : event->data.motion.hwnd ); + req->flags = 0; + req->input.type = INPUT_MOUSE; + req->input.mouse.x = event->data.motion.input.u.mi.dx; + req->input.mouse.y = event->data.motion.input.u.mi.dy; + req->input.mouse.data = event->data.motion.input.u.mi.mouseData; + req->input.mouse.flags = event->data.motion.input.u.mi.dwFlags; + req->input.mouse.time = event->data.motion.input.u.mi.time; + req->input.mouse.info = event->data.motion.input.u.mi.dwExtraInfo; + wine_server_call( req ); + } + SERVER_END_REQ; } break;
@@ -535,7 +549,20 @@ static int process_events( DWORD mask ) event->data.kbd.input.u.ki.wVk, event->data.kbd.input.u.ki.wVk, event->data.kbd.input.u.ki.wScan ); update_keyboard_lock_state( event->data.kbd.input.u.ki.wVk, event->data.kbd.lock_state ); - __wine_send_input( 0, &event->data.kbd.input ); + + SERVER_START_REQ( send_hardware_message ) + { + req->win = wine_server_user_handle( 0 ); + req->flags = 0; + req->input.type = INPUT_KEYBOARD; + req->input.kbd.vkey = event->data.kbd.input.u.ki.wVk; + req->input.kbd.scan = event->data.kbd.input.u.ki.wScan; + req->input.kbd.flags = event->data.kbd.input.u.ki.dwFlags; + req->input.kbd.time = event->data.kbd.input.u.ki.time; + req->input.kbd.info = event->data.kbd.input.u.ki.dwExtraInfo; + wine_server_call( req ); + } + SERVER_END_REQ; break;
default: