Add plumbing to server to prevent the server from making rawinput from INPUT_MOUSE and INPUT_KEYBOARD events so a graphics driver can inject its own INPUT_HARDWARE events. This will allow a graphics driver to be fully in charge of rawinput.
-- v6: https://gitlab.winehq.org/wine/wine/-/merge_requests/4356
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/win32u/message.c | 6 ++++++ server/queue.c | 3 +++ 2 files changed, 9 insertions(+)
diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c index d2909339983..961d2c0dc09 100644 --- a/dlls/win32u/message.c +++ b/dlls/win32u/message.c @@ -3486,6 +3486,12 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r req->input.hw.rawinput.type = rawinput->header.dwType; switch (rawinput->header.dwType) { + case RIM_TYPEMOUSE: + req->input.hw.rawinput.mouse.x = rawinput->data.mouse.lLastX; + req->input.hw.rawinput.mouse.y = rawinput->data.mouse.lLastY; + req->input.hw.rawinput.mouse.data = rawinput->data.mouse.ulRawButtons; + req->input.hw.lparam = rawinput->data.mouse.usFlags; + break; case RIM_TYPEHID: req->input.hw.rawinput.hid.device = HandleToUlong( rawinput->header.hDevice ); req->input.hw.rawinput.hid.param = rawinput->header.wParam; diff --git a/server/queue.c b/server/queue.c index 0558bd111f9..f609ce4478b 100644 --- a/server/queue.c +++ b/server/queue.c @@ -2141,6 +2141,9 @@ static void queue_custom_hardware_message( struct desktop *desktop, user_handle_ msg_data->size = sizeof(*msg_data) + report_size; msg_data->rawinput = input->hw.rawinput;
+ if (input->hw.msg == WM_INPUT && input->hw.rawinput.type == RIM_TYPEMOUSE) + msg_data->flags = input->hw.lparam; + enum_processes( queue_rawinput_message, &raw_msg ); return; }
From: EBADBEEF errno@ebadf.com
The "noraw" flags are used to mask off the original event flags. They are applied to INPUT_MOUSE and INPUT_KEYBOARD events to prevent generating a rawinput. --- include/wine/server_protocol.h | 2 ++ server/protocol.def | 2 ++ server/queue.c | 23 +++++++++++++++++------ server/trace.c | 9 +++++---- 4 files changed, 26 insertions(+), 10 deletions(-)
diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index a392b532f4e..1ba7b3dd3c7 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -327,6 +327,7 @@ typedef union unsigned short vkey; unsigned short scan; unsigned int flags; + unsigned int noraw; unsigned int time; lparam_t info; } kbd; @@ -337,6 +338,7 @@ typedef union int y; unsigned int data; unsigned int flags; + unsigned int noraw; unsigned int time; lparam_t info; } mouse; diff --git a/server/protocol.def b/server/protocol.def index e9195df6b65..6c329c44e20 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -343,6 +343,7 @@ typedef union unsigned short vkey; /* virtual key code */ unsigned short scan; /* scan code */ unsigned int flags; /* event flags */ + unsigned int noraw; /* flags to suppress rawinput generation */ unsigned int time; /* event time */ lparam_t info; /* extra info */ } kbd; @@ -353,6 +354,7 @@ typedef union int y; unsigned int data; /* mouse data */ unsigned int flags; /* event flags */ + unsigned int noraw; /* flags to suppress rawinput generation */ unsigned int time; /* event time */ lparam_t info; /* extra info */ } mouse; diff --git a/server/queue.c b/server/queue.c index f609ce4478b..a49c47c346b 100644 --- a/server/queue.c +++ b/server/queue.c @@ -1864,6 +1864,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons unsigned int i, time, flags; struct hw_msg_source source = { IMDT_MOUSE, origin }; int wait = 0, x, y; + unsigned int raw_flags;
static const unsigned int messages[] = { @@ -1884,6 +1885,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
desktop->cursor.last_change = get_tick_count(); flags = input->mouse.flags; + raw_flags = (input->mouse.flags & ~input->mouse.noraw); time = input->mouse.time; if (!time) time = desktop->cursor.last_change;
@@ -1896,6 +1898,10 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons if (flags & ~(MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE) && x == desktop->cursor.x && y == desktop->cursor.y) flags &= ~MOUSEEVENTF_MOVE; + + /* rawinput does not currently support absolute events which + * use (65535,65535) coordinate space */ + raw_flags &= ~MOUSEEVENTF_ABSOLUTE; } else { @@ -1909,7 +1915,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons y = desktop->cursor.y; }
- if ((foreground = get_foreground_thread( desktop, win ))) + if (raw_flags && (foreground = get_foreground_thread( desktop, win ))) { memset( &raw_msg, 0, sizeof(raw_msg) ); raw_msg.foreground = foreground; @@ -1921,10 +1927,13 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons msg_data = &raw_msg.data; msg_data->info = input->mouse.info; msg_data->size = sizeof(*msg_data); - msg_data->flags = flags; + msg_data->flags = raw_flags; + if (raw_flags & MOUSEEVENTF_MOVE) + { + msg_data->rawinput.mouse.x = x - desktop->cursor.x; + msg_data->rawinput.mouse.y = y - desktop->cursor.y; + } msg_data->rawinput.type = RIM_TYPEMOUSE; - msg_data->rawinput.mouse.x = x - desktop->cursor.x; - msg_data->rawinput.mouse.y = y - desktop->cursor.y; msg_data->rawinput.mouse.data = input->mouse.data;
enum_processes( queue_rawinput_message, &raw_msg ); @@ -1980,6 +1989,7 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c unsigned char vkey = input->kbd.vkey; unsigned int message_code, time; int wait; + unsigned int raw_flags;
if (!(time = input->kbd.time)) time = get_tick_count();
@@ -2047,7 +2057,8 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c break; }
- if ((foreground = get_foreground_thread( desktop, win ))) + raw_flags = (input->kbd.flags & ~input->kbd.noraw); + if (raw_flags && (foreground = get_foreground_thread( desktop, win ))) { memset( &raw_msg, 0, sizeof(raw_msg) ); raw_msg.foreground = foreground; @@ -2059,7 +2070,7 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c msg_data = &raw_msg.data; msg_data->info = input->kbd.info; msg_data->size = sizeof(*msg_data); - msg_data->flags = input->kbd.flags; + msg_data->flags = raw_flags; msg_data->rawinput.type = RIM_TYPEKEYBOARD; msg_data->rawinput.kbd.message = message_code; msg_data->rawinput.kbd.vkey = vkey; diff --git a/server/trace.c b/server/trace.c index 55ccefa1746..ecbd1735e62 100644 --- a/server/trace.c +++ b/server/trace.c @@ -449,15 +449,16 @@ static void dump_hw_input( const char *prefix, const hw_input_t *input ) switch (input->type) { case INPUT_MOUSE: - fprintf( stderr, "%s{type=MOUSE,x=%d,y=%d,data=%08x,flags=%08x,time=%u", + fprintf( stderr, "%s{type=MOUSE,x=%d,y=%d,data=%08x,flags=%08x,noraw=%08x,time=%u", prefix, input->mouse.x, input->mouse.y, input->mouse.data, input->mouse.flags, - input->mouse.time ); + input->mouse.noraw, input->mouse.time ); dump_uint64( ",info=", &input->mouse.info ); fputc( '}', stderr ); break; case INPUT_KEYBOARD: - fprintf( stderr, "%s{type=KEYBOARD,vkey=%04hx,scan=%04hx,flags=%08x,time=%u", - prefix, input->kbd.vkey, input->kbd.scan, input->kbd.flags, input->kbd.time ); + fprintf( stderr, "%s{type=KEYBOARD,vkey=%04hx,scan=%04hx,flags=%08x,noraw=%08x,time=%u", + prefix, input->kbd.vkey, input->kbd.scan, input->kbd.flags, input->kbd.noraw, + input->kbd.time ); dump_uint64( ",info=", &input->kbd.info ); fputc( '}', stderr ); break;
From: EBADBEEF errno@ebadf.com
This is plumbing for a graphics driver to be responsible for rawinput events (instead of letting the server generate them). --- dlls/hidclass.sys/device.c | 2 +- dlls/hidclass.sys/pnp.c | 2 +- dlls/win32u/input.c | 7 ++++--- dlls/win32u/message.c | 4 +++- dlls/win32u/win32u.spec | 2 +- dlls/win32u/win32u_private.h | 2 +- dlls/wineandroid.drv/keyboard.c | 2 +- dlls/wineandroid.drv/window.c | 4 ++-- dlls/winemac.drv/keyboard.c | 2 +- dlls/winemac.drv/mouse.c | 2 +- dlls/winewayland.drv/wayland_pointer.c | 6 +++--- dlls/winex11.drv/keyboard.c | 2 +- dlls/winex11.drv/mouse.c | 8 ++++---- include/ntuser.h | 2 +- 14 files changed, 25 insertions(+), 22 deletions(-)
diff --git a/dlls/hidclass.sys/device.c b/dlls/hidclass.sys/device.c index d673a8c2e88..512e533c796 100644 --- a/dlls/hidclass.sys/device.c +++ b/dlls/hidclass.sys/device.c @@ -252,7 +252,7 @@ static void hid_device_queue_input( DEVICE_OBJECT *device, HID_XFER_PACKET *pack input.hi.uMsg = WM_INPUT; input.hi.wParamH = 0; input.hi.wParamL = 0; - __wine_send_input( 0, &input, rawinput ); + __wine_send_input( 0, &input, rawinput, 0 );
free( rawinput ); } diff --git a/dlls/hidclass.sys/pnp.c b/dlls/hidclass.sys/pnp.c index ab3cd5b2cb5..c47962f676f 100644 --- a/dlls/hidclass.sys/pnp.c +++ b/dlls/hidclass.sys/pnp.c @@ -134,7 +134,7 @@ static void send_wm_input_device_change(BASE_DEVICE_EXTENSION *ext, LPARAM param input.hi.uMsg = WM_INPUT_DEVICE_CHANGE; input.hi.wParamH = 0; input.hi.wParamL = 0; - __wine_send_input(0, &input, &rawinput); + __wine_send_input(0, &input, &rawinput, 0); }
static NTSTATUS WINAPI driver_add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *bus_pdo) diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c index 3e6e440de93..a3fd0df0c5a 100644 --- a/dlls/win32u/input.c +++ b/dlls/win32u/input.c @@ -599,10 +599,11 @@ BOOL WINAPI NtUserAttachThreadInput( DWORD from, DWORD to, BOOL attach ) * __wine_send_input (win32u.@) * * Internal SendInput function to allow the graphics driver to inject real events. + * */ -BOOL WINAPI __wine_send_input( HWND hwnd, const INPUT *input, const RAWINPUT *rawinput ) +BOOL WINAPI __wine_send_input( HWND hwnd, const INPUT *input, const RAWINPUT *rawinput, UINT noraw_flags ) { - return set_ntstatus( send_hardware_message( hwnd, input, rawinput, 0 )); + return set_ntstatus( send_hardware_message( hwnd, input, rawinput, 0, noraw_flags )); }
/*********************************************************************** @@ -684,7 +685,7 @@ UINT WINAPI NtUserSendInput( UINT count, INPUT *inputs, int size ) update_mouse_coords( &input ); /* fallthrough */ case INPUT_KEYBOARD: - status = send_hardware_message( 0, &input, NULL, SEND_HWMSG_INJECTED ); + status = send_hardware_message( 0, &input, NULL, SEND_HWMSG_INJECTED, 0 ); break; case INPUT_HARDWARE: RtlSetLastWin32Error( ERROR_CALL_NOT_IMPLEMENTED ); diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c index 961d2c0dc09..e9a60b1c605 100644 --- a/dlls/win32u/message.c +++ b/dlls/win32u/message.c @@ -3416,7 +3416,7 @@ LRESULT send_internal_message_timeout( DWORD dest_pid, DWORD dest_tid, /*********************************************************************** * send_hardware_message */ -NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *rawinput, UINT flags ) +NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *rawinput, UINT flags, UINT noraw_flags ) { struct send_message_info info; int prev_x, prev_y, new_x, new_y; @@ -3461,6 +3461,7 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r req->input.mouse.y = input->mi.dy; req->input.mouse.data = input->mi.mouseData; req->input.mouse.flags = input->mi.dwFlags; + req->input.mouse.noraw = noraw_flags; req->input.mouse.time = input->mi.time; req->input.mouse.info = input->mi.dwExtraInfo; affects_key_state = !!(input->mi.dwFlags & (MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP | @@ -3472,6 +3473,7 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r req->input.kbd.vkey = input->ki.wVk; req->input.kbd.scan = input->ki.wScan; req->input.kbd.flags = input->ki.dwFlags; + req->input.kbd.noraw = noraw_flags; req->input.kbd.time = input->ki.time; req->input.kbd.info = input->ki.dwExtraInfo; affects_key_state = TRUE; diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index 24dccb6ec1d..e14f9bf4d8c 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -1322,4 +1322,4 @@
@ stdcall -syscall __wine_get_icm_profile(long long ptr ptr) @ stdcall -syscall __wine_get_file_outline_text_metric(wstr ptr ptr ptr) -@ stdcall -syscall __wine_send_input(long ptr ptr) +@ stdcall -syscall __wine_send_input(long ptr ptr long) diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 6380a0808c8..1cb5a1be72b 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -132,7 +132,7 @@ extern void track_mouse_menu_bar( HWND hwnd, INT ht, int x, int y ) DECLSPEC_HID extern BOOL kill_system_timer( HWND hwnd, UINT_PTR id ) DECLSPEC_HIDDEN; extern BOOL reply_message_result( LRESULT result ) DECLSPEC_HIDDEN; extern NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *rawinput, - UINT flags ) DECLSPEC_HIDDEN; + UINT flags, UINT noraw_flags ) DECLSPEC_HIDDEN; extern LRESULT send_internal_message_timeout( DWORD dest_pid, DWORD dest_tid, UINT msg, WPARAM wparam, LPARAM lparam, UINT flags, UINT timeout, PDWORD_PTR res_ptr ) DECLSPEC_HIDDEN; diff --git a/dlls/wineandroid.drv/keyboard.c b/dlls/wineandroid.drv/keyboard.c index 9f369094949..c430d7929e1 100644 --- a/dlls/wineandroid.drv/keyboard.c +++ b/dlls/wineandroid.drv/keyboard.c @@ -680,7 +680,7 @@ static void send_keyboard_input( HWND hwnd, WORD vkey, WORD scan, DWORD flags ) input.ki.time = 0; input.ki.dwExtraInfo = 0;
- __wine_send_input( hwnd, &input, NULL ); + __wine_send_input( hwnd, &input, NULL, 0 ); }
/*********************************************************************** diff --git a/dlls/wineandroid.drv/window.c b/dlls/wineandroid.drv/window.c index d62a2c53909..20e15465f1a 100644 --- a/dlls/wineandroid.drv/window.c +++ b/dlls/wineandroid.drv/window.c @@ -514,7 +514,7 @@ static int process_events( DWORD mask ) } SERVER_END_REQ; } - __wine_send_input( capture ? capture : event->data.motion.hwnd, &event->data.motion.input, NULL ); + __wine_send_input( capture ? capture : event->data.motion.hwnd, &event->data.motion.input, NULL, 0 ); } break;
@@ -528,7 +528,7 @@ static int process_events( DWORD mask ) event->data.kbd.input.ki.wVk, event->data.kbd.input.ki.wVk, event->data.kbd.input.ki.wScan ); update_keyboard_lock_state( event->data.kbd.input.ki.wVk, event->data.kbd.lock_state ); - __wine_send_input( 0, &event->data.kbd.input, NULL ); + __wine_send_input( 0, &event->data.kbd.input, NULL, 0 ); break;
default: diff --git a/dlls/winemac.drv/keyboard.c b/dlls/winemac.drv/keyboard.c index bf1daa7a5df..902c1280337 100644 --- a/dlls/winemac.drv/keyboard.c +++ b/dlls/winemac.drv/keyboard.c @@ -1001,7 +1001,7 @@ static void macdrv_send_keyboard_input(HWND hwnd, WORD vkey, WORD scan, unsigned input.ki.time = time; input.ki.dwExtraInfo = 0;
- __wine_send_input(hwnd, &input, NULL); + __wine_send_input(hwnd, &input, NULL, 0); }
diff --git a/dlls/winemac.drv/mouse.c b/dlls/winemac.drv/mouse.c index 2f05a33a8b5..4e3b5653425 100644 --- a/dlls/winemac.drv/mouse.c +++ b/dlls/winemac.drv/mouse.c @@ -158,7 +158,7 @@ static void send_mouse_input(HWND hwnd, macdrv_window cocoa_window, UINT flags, input.mi.time = time; input.mi.dwExtraInfo = 0;
- __wine_send_input(top_level_hwnd, &input, NULL); + __wine_send_input(top_level_hwnd, &input, NULL, 0); }
diff --git a/dlls/winewayland.drv/wayland_pointer.c b/dlls/winewayland.drv/wayland_pointer.c index ff376882d73..5d6a6248e55 100644 --- a/dlls/winewayland.drv/wayland_pointer.c +++ b/dlls/winewayland.drv/wayland_pointer.c @@ -75,7 +75,7 @@ static void pointer_handle_motion(void *data, struct wl_pointer *wl_pointer, hwnd, wl_fixed_to_double(sx), wl_fixed_to_double(sy), screen_x, screen_y);
- __wine_send_input(hwnd, &input, NULL); + __wine_send_input(hwnd, &input, NULL, 0); }
static void pointer_handle_enter(void *data, struct wl_pointer *wl_pointer, @@ -154,7 +154,7 @@ static void pointer_handle_button(void *data, struct wl_pointer *wl_pointer,
TRACE("hwnd=%p button=%#x state=%u\n", hwnd, button, state);
- __wine_send_input(hwnd, &input, NULL); + __wine_send_input(hwnd, &input, NULL, 0); }
static void pointer_handle_axis(void *data, struct wl_pointer *wl_pointer, @@ -201,7 +201,7 @@ static void pointer_handle_axis_discrete(void *data, struct wl_pointer *wl_point
TRACE("hwnd=%p axis=%u discrete=%d\n", hwnd, axis, discrete);
- __wine_send_input(hwnd, &input, NULL); + __wine_send_input(hwnd, &input, NULL, 0); }
static const struct wl_pointer_listener pointer_listener = diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c index 5c7f6c37276..895b106297d 100644 --- a/dlls/winex11.drv/keyboard.c +++ b/dlls/winex11.drv/keyboard.c @@ -1132,7 +1132,7 @@ static void X11DRV_send_keyboard_input( HWND hwnd, WORD vkey, WORD scan, UINT fl input.ki.time = time; input.ki.dwExtraInfo = 0;
- __wine_send_input( hwnd, &input, NULL ); + __wine_send_input( hwnd, &input, NULL, 0 ); }
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 612fff9995c..2ea007ab588 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -528,7 +528,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU { struct x11drv_thread_data *thread_data = x11drv_thread_data(); if (!thread_data->clipping_cursor || thread_data->clip_window != window) return; - __wine_send_input( hwnd, input, NULL ); + __wine_send_input( hwnd, input, NULL, 0 ); return; }
@@ -555,7 +555,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU SERVER_END_REQ; }
- __wine_send_input( hwnd, input, NULL ); + __wine_send_input( hwnd, input, NULL, 0 ); }
#ifdef SONAME_LIBXCURSOR @@ -1498,7 +1498,7 @@ void move_resize_window( HWND hwnd, int dir ) input.mi.dwFlags = button_up_flags[button - 1] | MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE; input.mi.time = NtGetTickCount(); input.mi.dwExtraInfo = 0; - __wine_send_input( hwnd, &input, NULL ); + __wine_send_input( hwnd, &input, NULL, 0 ); }
while (NtUserPeekMessage( &msg, 0, 0, 0, PM_REMOVE )) @@ -1747,7 +1747,7 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev ) input.mi.dy = 0; if (!map_raw_event_coords( event, &input )) return FALSE;
- __wine_send_input( 0, &input, NULL ); + __wine_send_input( 0, &input, NULL, 0 ); return TRUE; }
diff --git a/include/ntuser.h b/include/ntuser.h index def89a82aff..05859762036 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -1387,6 +1387,6 @@ static inline BOOL NtUserShowOwnedPopups( HWND hwnd, BOOL show ) }
/* Wine extensions */ -W32KAPI BOOL WINAPI __wine_send_input( HWND hwnd, const INPUT *input, const RAWINPUT *rawinput ); +W32KAPI BOOL WINAPI __wine_send_input( HWND hwnd, const INPUT *input, const RAWINPUT *rawinput, UINT noraw_flags );
#endif /* _NTUSER_ */
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=139753
Your paranoid android.
=== debian11b (64 bit WoW report) ===
dinput: device8.c:2233: Test failed: 0x800: WaitForSingleObject returned 0x102 device8.c:1698: Test failed: 0x800: lang 0x409: key 0x51, dik 0x10: got state 0 device8.c:1698: Test failed: 0x800: lang 0x409: key 0x57, dik 0x11: got state 0 device8.c:1698: Test failed: 0x800: lang 0x409: key 0x45, dik 0x12: got state 0 device8.c:1698: Test failed: 0x800: lang 0x409: key 0x52, dik 0x13: got state 0 device8.c:1698: Test failed: 0x800: lang 0x409: key 0x54, dik 0x14: got state 0 device8.c:1698: Test failed: 0x800: lang 0x409: key 0x59, dik 0x15: got state 0 device8.c:1698: Test failed: 0x800: lang 0x409: key 0x5b, dik 0x1a: got state 0 device8.c:1698: Test failed: 0x800: lang 0x409: key 0x5d, dik 0x1b: got state 0 device8.c:1698: Test failed: 0x800: lang 0x409: key 0x2e, dik 0x34: got state 0 device8.c:800: Test failed: Expected 1 element, received 0 device8.c:804: Test failed: Expected DIK_SPACE key state down device8.c:812: Test failed: Expected 1 element, received 0 device8.c:507: Test failed: WaitForSingleObject returned 0x102 device8.c:511: Test failed: WaitForSingleObject returned 0x102 device8.c:507: Test failed: WaitForSingleObject returned 0x102 device8.c:511: Test failed: WaitForSingleObject returned 0x102 device8.c:507: Test failed: WaitForSingleObject returned 0x102 device8.c:511: Test failed: WaitForSingleObject returned 0x102 device8.c:507: Test failed: WaitForSingleObject returned 0x102 device8.c:511: Test failed: WaitForSingleObject returned 0x102 device8.c:507: Test failed: WaitForSingleObject returned 0x102 device8.c:511: Test failed: WaitForSingleObject returned 0x102 device8.c:507: Test failed: WaitForSingleObject returned 0x102 device8.c:511: Test failed: WaitForSingleObject returned 0x102 device8: Timeout
user32: input.c:2553: Test failed: GetRawInputBuffer returned 1
How is this different from the patches that are already in wine-staging?
@rbernon I found the patch that adds SEND_HWMSG_RAWINPUT flag[1]. I guess I did see that one in Proton! These changes allow finer granularity. For example, the graphics driver can be in charge of rawinput MOUSEEVENTF_MOVE but not button presses (etc...). Also if the graphics driver does not support rawinput the server will still be able to generate them.
[1] https://gitlab.winehq.org/wine/wine-staging/-/blob/master/patches/user32-raw...
Thinking about it a little more (and looking at more of the patches)... SEND_HWMSG_RAWINPUT is probably sufficient, but I think my changes are easier to reason about ;-) I will revisit this in a couple days and try to use it.
This merge request was closed by Errno Ebadf.
The user32-rawinput-mouse wine-staging changes already serve the need for graphics drivers to be able to control the server generating raw input events. An individual driver can decide which flags should generate a raw input or not rather than my approach of telling the server which flags should be ignored.