diff --git a/patches/ntdll-WRITECOPY/0003-ntdll-Setup-a-temporary-signal-handler-during-proces.patch b/patches/ntdll-WRITECOPY/0003-ntdll-Setup-a-temporary-signal-handler-during-proces.patch index 21dccaa3..b05fb4d0 100644 --- a/patches/ntdll-WRITECOPY/0003-ntdll-Setup-a-temporary-signal-handler-during-proces.patch +++ b/patches/ntdll-WRITECOPY/0003-ntdll-Setup-a-temporary-signal-handler-during-proces.patch @@ -1,4 +1,4 @@ -From 4935d5a693f839352e94094c2bbfeb361baff009 Mon Sep 17 00:00:00 2001 +From 3986e2d381e2b78d0bc572b7014f2445aa4bc6fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sat, 4 Oct 2014 02:53:22 +0200 Subject: [PATCH] ntdll: Setup a temporary signal handler during process @@ -45,10 +45,10 @@ index 28cb2222809..b3b55a11e4f 100644 /*********************************************************************** * call_init_thunk diff --git a/dlls/ntdll/unix/signal_arm64.c b/dlls/ntdll/unix/signal_arm64.c -index f553aac1993..192baf23251 100644 +index d98268bcd54..2b92bbd7ed3 100644 --- a/dlls/ntdll/unix/signal_arm64.c +++ b/dlls/ntdll/unix/signal_arm64.c -@@ -1576,6 +1576,12 @@ void signal_init_process(void) +@@ -1594,6 +1594,12 @@ void signal_init_process(void) exit(1); } @@ -60,7 +60,7 @@ index f553aac1993..192baf23251 100644 +} /*********************************************************************** - * call_init_thunk + * syscall_dispatcher_return_slowpath diff --git a/dlls/ntdll/unix/signal_i386.c b/dlls/ntdll/unix/signal_i386.c index 11bdd9c1ea6..f688795ab91 100644 --- a/dlls/ntdll/unix/signal_i386.c @@ -132,10 +132,10 @@ index 11bdd9c1ea6..f688795ab91 100644 /*********************************************************************** * call_init_thunk diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c -index 8302976706c..a1d118b61da 100644 +index 0204139631f..f8831b80a2b 100644 --- a/dlls/ntdll/unix/signal_x86_64.c +++ b/dlls/ntdll/unix/signal_x86_64.c -@@ -2640,6 +2640,12 @@ void signal_init_process(void) +@@ -2455,6 +2455,12 @@ void signal_init_process(void) exit(1); } @@ -149,7 +149,7 @@ index 8302976706c..a1d118b61da 100644 /*********************************************************************** * call_init_thunk diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h -index 16bf5cc2c78..c03d8675244 100644 +index e1cace7ba78..0ea15f48787 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h @@ -268,6 +268,7 @@ extern void signal_init_threading(void) DECLSPEC_HIDDEN; @@ -161,7 +161,7 @@ index 16bf5cc2c78..c03d8675244 100644 BOOL suspend, TEB *teb ) DECLSPEC_HIDDEN; extern void DECLSPEC_NORETURN signal_exit_thread( int status, void (*func)(int), TEB *teb ) DECLSPEC_HIDDEN; diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c -index a06f675af7c..a7705e78fb4 100644 +index b5fdeb5707b..03ce50d0677 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -3703,7 +3703,7 @@ NTSTATUS virtual_handle_fault( void *addr, DWORD err, void *stack ) diff --git a/patches/user32-rawinput-mouse-experimental/0005-winex11.drv-Add-support-for-absolute-RawMotion-event.patch b/patches/user32-rawinput-mouse-experimental/0005-winex11.drv-Add-support-for-absolute-RawMotion-event.patch index a8ab2e84..a320a817 100644 --- a/patches/user32-rawinput-mouse-experimental/0005-winex11.drv-Add-support-for-absolute-RawMotion-event.patch +++ b/patches/user32-rawinput-mouse-experimental/0005-winex11.drv-Add-support-for-absolute-RawMotion-event.patch @@ -1,17 +1,17 @@ -From 8d0252f43188cbc9b50dbc8280ae60de04f41a71 Mon Sep 17 00:00:00 2001 +From eef4aa97b1271118a95419cbca2870c0bfa6fbcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Thu, 28 Oct 2021 09:18:37 +0200 Subject: [PATCH] winex11.drv: Add support for absolute RawMotion events. --- - dlls/winex11.drv/mouse.c | 28 ++++++++++++++++++++++------ - 1 file changed, 22 insertions(+), 6 deletions(-) + dlls/winex11.drv/mouse.c | 26 +++++++++++++++++++++----- + 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c -index 179032d5c83..445d0a78c6a 100644 +index ec12c8b1917..f10745a1ad0 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c -@@ -339,12 +339,18 @@ static void update_relative_valuators( XIAnyClassInfo **classes, int num_classes +@@ -315,12 +315,18 @@ static void update_relative_valuators( XIAnyClassInfo **classes, int num_classes { valuator = (XIValuatorClassInfo *)classes[num_classes]; if (classes[num_classes]->type != XIValuatorClass) continue; @@ -32,24 +32,24 @@ index 179032d5c83..445d0a78c6a 100644 thread_data->x_valuator.value = 0; thread_data->y_valuator.value = 0; -@@ -1951,7 +1957,15 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input ) +@@ -1778,7 +1784,15 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input ) if (thread_data->xi2_state != xi_enabled) return FALSE; if (event->deviceid != thread_data->xi2_core_pointer) return FALSE; - virtual_rect = NtUserGetVirtualScreenRect(); + if (x->mode == XIModeRelative && y->mode == XIModeRelative) -+ input->u.mi.dwFlags &= ~(MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_VIRTUALDESK); ++ input->mi.dwFlags &= ~(MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_VIRTUALDESK); + else if (x->mode == XIModeAbsolute && y->mode == XIModeAbsolute) -+ input->u.mi.dwFlags |= MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_VIRTUALDESK; ++ input->mi.dwFlags |= MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_VIRTUALDESK; + else + FIXME( "Unsupported relative/absolute X/Y axis mismatch\n." ); + -+ if (input->u.mi.dwFlags & MOUSEEVENTF_VIRTUALDESK) SetRect( &virtual_rect, 0, 0, 65535, 65535 ); ++ if (input->mi.dwFlags & MOUSEEVENTF_VIRTUALDESK) SetRect( &virtual_rect, 0, 0, 65535, 65535 ); + else virtual_rect = NtUserGetVirtualScreenRect(); if (x->max <= x->min) x_scale = 1; else x_scale = (virtual_rect.right - virtual_rect.left) / (x->max - x->min); -@@ -1964,12 +1978,14 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input ) +@@ -1791,12 +1805,14 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input ) if (i == x->number) { x_value = *values; @@ -66,15 +66,6 @@ index 179032d5c83..445d0a78c6a 100644 } values++; } -@@ -1982,7 +1998,7 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input ) - x->value -= input->u.mi.dx; - y->value -= input->u.mi.dy; - -- if (!input->u.mi.dx && !input->u.mi.dy) -+ if (!(input->u.mi.dwFlags & MOUSEEVENTF_ABSOLUTE) && !input->u.mi.dx && !input->u.mi.dy) - { - TRACE( "accumulating motion\n" ); - return FALSE; -- -2.35.1 +2.40.1 diff --git a/patches/user32-rawinput-mouse-experimental/0006-winex11.drv-Send-relative-RawMotion-events-unprocess.patch b/patches/user32-rawinput-mouse-experimental/0006-winex11.drv-Send-relative-RawMotion-events-unprocess.patch index cd05bc69..a3176bc7 100644 --- a/patches/user32-rawinput-mouse-experimental/0006-winex11.drv-Send-relative-RawMotion-events-unprocess.patch +++ b/patches/user32-rawinput-mouse-experimental/0006-winex11.drv-Send-relative-RawMotion-events-unprocess.patch @@ -1,4 +1,4 @@ -From 7e0df0539b242a4a87b8189232eefb3164fe4617 Mon Sep 17 00:00:00 2001 +From d45e910803dd78f892ddece1743849943d7c67f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Mon, 25 Oct 2021 11:48:00 +0200 Subject: [PATCH] winex11.drv: Send relative RawMotion events unprocessed. @@ -9,14 +9,14 @@ virtual desktop space, and cursor speed is meaningless in this case. This does not support mixed relative/absolute X/Y axis. --- - dlls/winex11.drv/mouse.c | 24 ++++++++++++------------ - 1 file changed, 12 insertions(+), 12 deletions(-) + dlls/winex11.drv/mouse.c | 18 ++++++++++++------ + 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c -index e691f75465d..d6890a384e3 100644 +index 4a42b3c85b6..e58ee125c95 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c -@@ -1972,12 +1972,12 @@ static BOOL X11DRV_DeviceChanged( XGenericEventCookie *xev ) +@@ -1770,12 +1770,12 @@ static BOOL X11DRV_DeviceChanged( XGenericEventCookie *xev ) return TRUE; } @@ -32,7 +32,7 @@ index e691f75465d..d6890a384e3 100644 RECT virtual_rect; int i; -@@ -2006,34 +2006,36 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input ) +@@ -1804,22 +1804,30 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input ) if (!XIMaskIsSet( event->valuators.mask, i )) continue; if (i == x->number) { @@ -52,47 +52,35 @@ index e691f75465d..d6890a384e3 100644 values++; } - input->u.mi.dx = round( x->value ); - input->u.mi.dy = round( y->value ); + input->mi.dx = round( x->value ); + input->mi.dy = round( y->value ); + if (x->mode != XIModeAbsolute) rawinput->data.mouse.lLastX = x_raw; -+ else rawinput->data.mouse.lLastX = input->u.mi.dx; ++ else rawinput->data.mouse.lLastX = input->mi.dx; + if (y->mode != XIModeAbsolute) rawinput->data.mouse.lLastY = y_raw; -+ else rawinput->data.mouse.lLastY = input->u.mi.dy; ++ else rawinput->data.mouse.lLastY = input->mi.dy; + TRACE( "event %f,%f value %f,%f input %d,%d\n", x_value, y_value, x->value, y->value, - (int)input->u.mi.dx, (int)input->u.mi.dy ); + (int)input->mi.dx, (int)input->mi.dy ); - x->value -= input->u.mi.dx; - y->value -= input->u.mi.dy; - -- if (!(input->u.mi.dwFlags & MOUSEEVENTF_ABSOLUTE) && !input->u.mi.dx && !input->u.mi.dy) -- { -- TRACE( "accumulating motion\n" ); -- return FALSE; -- } -- - return TRUE; - } - -@@ -2060,7 +2062,7 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev ) - input.u.mi.dwExtraInfo = 0; - input.u.mi.dx = 0; - input.u.mi.dy = 0; +@@ -1858,7 +1866,7 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev ) + input.mi.dwExtraInfo = 0; + input.mi.dx = 0; + input.mi.dy = 0; - if (!map_raw_event_coords( event, &input )) return FALSE; + if (!map_raw_event_coords( event, &input, &rawinput )) return FALSE; if (!thread_data->xi2_rawinput_only) __wine_send_input( 0, &input, NULL ); -@@ -2074,8 +2076,6 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev ) +@@ -1872,8 +1880,6 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev ) rawinput.data.mouse.ulRawButtons = 0; - rawinput.data.mouse.u.usButtonData = 0; - rawinput.data.mouse.u.usButtonFlags = 0; -- rawinput.data.mouse.lLastX = input.u.mi.dx; -- rawinput.data.mouse.lLastY = input.u.mi.dy; + rawinput.data.mouse.usButtonData = 0; + rawinput.data.mouse.usButtonFlags = 0; +- rawinput.data.mouse.lLastX = input.mi.dx; +- rawinput.data.mouse.lLastY = input.mi.dy; rawinput.data.mouse.ulExtraInformation = 0; input.type = INPUT_HARDWARE; -- -2.38.1 +2.40.1 diff --git a/patches/user32-rawinput-mouse/0006-user32-Set-SEND_HWMSG_RAWINPUT-flags-only-when-RAWIN.patch b/patches/user32-rawinput-mouse/0006-user32-Set-SEND_HWMSG_RAWINPUT-flags-only-when-RAWIN.patch index e45fccde..8d425191 100644 --- a/patches/user32-rawinput-mouse/0006-user32-Set-SEND_HWMSG_RAWINPUT-flags-only-when-RAWIN.patch +++ b/patches/user32-rawinput-mouse/0006-user32-Set-SEND_HWMSG_RAWINPUT-flags-only-when-RAWIN.patch @@ -1,4 +1,4 @@ -From 89e3ab4eceaa473697590e2264b0a1d7ccd149f4 Mon Sep 17 00:00:00 2001 +From 563e36d041a509b71fb7f889dee52dee151a7442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Wed, 24 Mar 2021 23:29:28 +0100 Subject: [PATCH] user32: Set SEND_HWMSG_RAWINPUT flags only when RAWINPUT is @@ -19,7 +19,7 @@ __wine_send_input with INPUT_HARDWARE input type and a rawinput. 8 files changed, 22 insertions(+), 13 deletions(-) diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c -index 5d78b35dd60..cbdd4b195d3 100644 +index 7eb8e59a5fb..53fec064842 100644 --- a/dlls/win32u/input.c +++ b/dlls/win32u/input.c @@ -655,6 +655,7 @@ UINT WINAPI NtUserSendInput( UINT count, INPUT *inputs, int size ) @@ -40,10 +40,10 @@ index 5d78b35dd60..cbdd4b195d3 100644 case INPUT_HARDWARE: RtlSetLastWin32Error( ERROR_CALL_NOT_IMPLEMENTED ); diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c -index f47154d701a..00ed06abbdf 100644 +index 179b801a9f8..3fb36f4762c 100644 --- a/dlls/win32u/message.c +++ b/dlls/win32u/message.c -@@ -2632,7 +2632,7 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r +@@ -2669,7 +2669,7 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r req->input.mouse.flags = input->mi.dwFlags; req->input.mouse.time = input->mi.time; req->input.mouse.info = input->mi.dwExtraInfo; @@ -52,7 +52,7 @@ index f47154d701a..00ed06abbdf 100644 affects_key_state = !!(input->mi.dwFlags & (MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP | MOUSEEVENTF_RIGHTDOWN | MOUSEEVENTF_RIGHTUP | MOUSEEVENTF_MIDDLEDOWN | MOUSEEVENTF_MIDDLEUP | -@@ -2644,7 +2644,7 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r +@@ -2681,7 +2681,7 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r req->input.kbd.flags = input->ki.dwFlags; req->input.kbd.time = input->ki.time; req->input.kbd.info = input->ki.dwExtraInfo; @@ -62,20 +62,20 @@ index f47154d701a..00ed06abbdf 100644 break; case INPUT_HARDWARE: diff --git a/dlls/wineandroid.drv/keyboard.c b/dlls/wineandroid.drv/keyboard.c -index 7c55c481353..9a20daf8809 100644 +index 9f369094949..1606afb3f86 100644 --- a/dlls/wineandroid.drv/keyboard.c +++ b/dlls/wineandroid.drv/keyboard.c -@@ -674,6 +674,7 @@ static BOOL get_async_key_state( BYTE state[256] ) +@@ -671,6 +671,7 @@ static BOOL get_async_key_state( BYTE state[256] ) static void send_keyboard_input( HWND hwnd, WORD vkey, WORD scan, DWORD flags ) { + RAWINPUT rawinput; INPUT input; - input.type = INPUT_KEYBOARD; -@@ -683,7 +684,7 @@ static void send_keyboard_input( HWND hwnd, WORD vkey, WORD scan, DWORD flags ) - input.u.ki.time = 0; - input.u.ki.dwExtraInfo = 0; + input.type = INPUT_KEYBOARD; +@@ -680,7 +681,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, &rawinput ); @@ -83,10 +83,10 @@ index 7c55c481353..9a20daf8809 100644 /*********************************************************************** diff --git a/dlls/wineandroid.drv/window.c b/dlls/wineandroid.drv/window.c -index 3a61a2d44d9..a94183f46bf 100644 +index d62a2c53909..47a424b40b8 100644 --- a/dlls/wineandroid.drv/window.c +++ b/dlls/wineandroid.drv/window.c -@@ -424,6 +424,7 @@ static int process_events( DWORD mask ) +@@ -421,6 +421,7 @@ static int process_events( DWORD mask ) DPI_AWARENESS_CONTEXT context; struct java_event *event, *next, *previous; unsigned int count = 0; @@ -94,7 +94,7 @@ index 3a61a2d44d9..a94183f46bf 100644 assert( GetCurrentThreadId() == desktop_tid ); -@@ -517,7 +518,7 @@ static int process_events( DWORD mask ) +@@ -514,7 +515,7 @@ static int process_events( DWORD mask ) } SERVER_END_REQ; } @@ -103,10 +103,10 @@ index 3a61a2d44d9..a94183f46bf 100644 } break; -@@ -531,7 +532,7 @@ 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 ); +@@ -528,7 +529,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, &rawinput ); break; @@ -155,10 +155,10 @@ index 5c04c71e1dc..260831c44dc 100644 diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c -index 83169a9bb4d..ecd513ee2a4 100644 +index b54ca795954..231af33fd48 100644 --- a/dlls/winex11.drv/keyboard.c +++ b/dlls/winex11.drv/keyboard.c -@@ -1123,6 +1123,7 @@ static WORD EVENT_event_to_vkey( XIC xic, XKeyEvent *e) +@@ -1121,6 +1121,7 @@ static WORD EVENT_event_to_vkey( XIC xic, XKeyEvent *e) */ static void X11DRV_send_keyboard_input( HWND hwnd, WORD vkey, WORD scan, UINT flags, UINT time ) { @@ -166,9 +166,9 @@ index 83169a9bb4d..ecd513ee2a4 100644 INPUT input; TRACE_(key)( "hwnd %p vkey=%04x scan=%04x flags=%04x\n", hwnd, vkey, scan, flags ); -@@ -1134,7 +1135,7 @@ static void X11DRV_send_keyboard_input( HWND hwnd, WORD vkey, WORD scan, UINT fl - input.u.ki.time = time; - input.u.ki.dwExtraInfo = 0; +@@ -1132,7 +1133,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, &rawinput ); @@ -176,10 +176,10 @@ index 83169a9bb4d..ecd513ee2a4 100644 diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c -index 20d57aa76f3..7925a2f4070 100644 +index d8e9b8155fb..61b1870ba5a 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c -@@ -626,6 +626,7 @@ static void map_event_coords( HWND hwnd, Window window, Window event_root, int x +@@ -625,6 +625,7 @@ static void map_event_coords( HWND hwnd, Window window, Window event_root, int x static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPUT *input ) { struct x11drv_win_data *data; @@ -187,7 +187,7 @@ index 20d57aa76f3..7925a2f4070 100644 input->type = INPUT_MOUSE; -@@ -633,7 +634,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU +@@ -632,7 +633,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; @@ -196,7 +196,7 @@ index 20d57aa76f3..7925a2f4070 100644 return; } -@@ -660,7 +661,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU +@@ -659,7 +660,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU SERVER_END_REQ; } @@ -205,7 +205,7 @@ index 20d57aa76f3..7925a2f4070 100644 } #ifdef SONAME_LIBXCURSOR -@@ -1588,6 +1589,7 @@ void move_resize_window( HWND hwnd, int dir ) +@@ -1587,6 +1588,7 @@ void move_resize_window( HWND hwnd, int dir ) { MSG msg; INPUT input; @@ -213,16 +213,16 @@ index 20d57aa76f3..7925a2f4070 100644 int x, y, rootX, rootY; if (!XQueryPointer( display, root_window, &root, &child, &rootX, &rootY, &x, &y, &xstate )) break; -@@ -1603,7 +1605,7 @@ void move_resize_window( HWND hwnd, int dir ) - input.u.mi.dwFlags = button_up_flags[button - 1] | MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE; - input.u.mi.time = NtGetTickCount(); - input.u.mi.dwExtraInfo = 0; +@@ -1602,7 +1604,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, &rawinput ); } while (NtUserPeekMessage( &msg, 0, 0, 0, PM_REMOVE )) -@@ -1816,6 +1818,7 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input ) +@@ -1815,6 +1817,7 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input ) static BOOL X11DRV_RawMotion( XGenericEventCookie *xev ) { XIRawEvent *event = xev->data; @@ -230,8 +230,8 @@ index 20d57aa76f3..7925a2f4070 100644 INPUT input; if (broken_rawevents && is_old_motion_event( xev->serial )) -@@ -1833,7 +1836,7 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev ) - input.u.mi.dy = 0; +@@ -1832,7 +1835,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 ); diff --git a/patches/user32-rawinput-mouse/0008-winex11.drv-Listen-to-RawMotion-and-RawButton-events.patch b/patches/user32-rawinput-mouse/0008-winex11.drv-Listen-to-RawMotion-and-RawButton-events.patch index b5699f32..33bca2ad 100644 --- a/patches/user32-rawinput-mouse/0008-winex11.drv-Listen-to-RawMotion-and-RawButton-events.patch +++ b/patches/user32-rawinput-mouse/0008-winex11.drv-Listen-to-RawMotion-and-RawButton-events.patch @@ -1,4 +1,4 @@ -From 8cfe8a261f9138c6227610fd0c9bc222bc0b1871 Mon Sep 17 00:00:00 2001 +From cf4f812de02820e94c30758a9267872bd5429ac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Mon, 25 Oct 2021 11:45:47 +0200 Subject: [PATCH] winex11.drv: Listen to RawMotion and RawButton* events in the @@ -54,10 +54,10 @@ index e5021eb38ff..9cf7969dce2 100644 #endif } diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c -index 7925a2f4070..fce58d2b48a 100644 +index 61b1870ba5a..27916622ed8 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c -@@ -389,7 +389,18 @@ void x11drv_xinput_enable( Display *display, Window window, long event_mask ) +@@ -388,7 +388,18 @@ void x11drv_xinput_enable( Display *display, Window window, long event_mask ) memset( mask_bits, 0, sizeof(mask_bits) ); XISetMask( mask_bits, XI_DeviceChanged ); XISetMask( mask_bits, XI_RawMotion ); @@ -77,7 +77,7 @@ index 7925a2f4070..fce58d2b48a 100644 pXISelectEvents( display, DefaultRootWindow( display ), &mask, 1 ); -@@ -626,7 +637,6 @@ static void map_event_coords( HWND hwnd, Window window, Window event_root, int x +@@ -625,7 +636,6 @@ static void map_event_coords( HWND hwnd, Window window, Window event_root, int x static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPUT *input ) { struct x11drv_win_data *data; @@ -85,7 +85,7 @@ index 7925a2f4070..fce58d2b48a 100644 input->type = INPUT_MOUSE; -@@ -634,7 +644,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU +@@ -633,7 +643,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; @@ -94,7 +94,7 @@ index 7925a2f4070..fce58d2b48a 100644 return; } -@@ -661,7 +671,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU +@@ -660,7 +670,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU SERVER_END_REQ; } @@ -103,7 +103,7 @@ index 7925a2f4070..fce58d2b48a 100644 } #ifdef SONAME_LIBXCURSOR -@@ -1589,7 +1599,6 @@ void move_resize_window( HWND hwnd, int dir ) +@@ -1588,7 +1598,6 @@ void move_resize_window( HWND hwnd, int dir ) { MSG msg; INPUT input; @@ -111,16 +111,16 @@ index 7925a2f4070..fce58d2b48a 100644 int x, y, rootX, rootY; if (!XQueryPointer( display, root_window, &root, &child, &rootX, &rootY, &x, &y, &xstate )) break; -@@ -1605,7 +1614,7 @@ void move_resize_window( HWND hwnd, int dir ) - input.u.mi.dwFlags = button_up_flags[button - 1] | MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE; - input.u.mi.time = NtGetTickCount(); - input.u.mi.dwExtraInfo = 0; +@@ -1604,7 +1613,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, &rawinput ); + __wine_send_input( hwnd, &input, NULL ); } while (NtUserPeekMessage( &msg, 0, 0, 0, PM_REMOVE )) -@@ -1817,6 +1826,7 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input ) +@@ -1816,6 +1825,7 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input ) */ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev ) { @@ -128,8 +128,8 @@ index 7925a2f4070..fce58d2b48a 100644 XIRawEvent *event = xev->data; RAWINPUT rawinput; INPUT input; -@@ -1836,7 +1846,85 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev ) - input.u.mi.dy = 0; +@@ -1835,7 +1845,85 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev ) + input.mi.dy = 0; if (!map_raw_event_coords( event, &input )) return FALSE; - __wine_send_input( 0, &input, &rawinput ); @@ -141,18 +141,18 @@ index 7925a2f4070..fce58d2b48a 100644 + rawinput.header.dwSize = offsetof(RAWINPUT, data) + sizeof(RAWMOUSE); + rawinput.header.hDevice = ULongToHandle(1); /* WINE_MOUSE_HANDLE */ + rawinput.header.wParam = RIM_INPUT; -+ rawinput.data.mouse.usFlags = input.u.mi.dwFlags; ++ rawinput.data.mouse.usFlags = input.mi.dwFlags; + rawinput.data.mouse.ulRawButtons = 0; -+ rawinput.data.mouse.u.usButtonData = 0; -+ rawinput.data.mouse.u.usButtonFlags = 0; -+ rawinput.data.mouse.lLastX = input.u.mi.dx; -+ rawinput.data.mouse.lLastY = input.u.mi.dy; ++ rawinput.data.mouse.usButtonData = 0; ++ rawinput.data.mouse.usButtonFlags = 0; ++ rawinput.data.mouse.lLastX = input.mi.dx; ++ rawinput.data.mouse.lLastY = input.mi.dy; + rawinput.data.mouse.ulExtraInformation = 0; + + input.type = INPUT_HARDWARE; -+ input.u.hi.uMsg = WM_INPUT; -+ input.u.hi.wParamH = 0; -+ input.u.hi.wParamL = 0; ++ input.hi.uMsg = WM_INPUT; ++ input.hi.wParamH = 0; ++ input.hi.wParamL = 0; + if (rawinput.data.mouse.lLastX || rawinput.data.mouse.lLastY) + __wine_send_input( 0, &input, &rawinput ); + } @@ -200,22 +200,22 @@ index 7925a2f4070..fce58d2b48a 100644 + rawinput.data.mouse.usFlags = button_down_flags[button]; + rawinput.data.mouse.ulRawButtons = button_down_data[button]; + } -+ rawinput.data.mouse.u.usButtonData = 0; -+ rawinput.data.mouse.u.usButtonFlags = 0; ++ rawinput.data.mouse.usButtonData = 0; ++ rawinput.data.mouse.usButtonFlags = 0; + rawinput.data.mouse.lLastX = 0; + rawinput.data.mouse.lLastY = 0; + rawinput.data.mouse.ulExtraInformation = 0; + + input.type = INPUT_HARDWARE; -+ input.u.hi.uMsg = WM_INPUT; -+ input.u.hi.wParamH = 0; -+ input.u.hi.wParamL = 0; ++ input.hi.uMsg = WM_INPUT; ++ input.hi.wParamH = 0; ++ input.hi.wParamL = 0; + if (rawinput.data.mouse.usFlags || rawinput.data.mouse.ulRawButtons) + __wine_send_input( 0, &input, &rawinput ); return TRUE; } -@@ -1912,6 +2000,10 @@ BOOL X11DRV_GenericEvent( HWND hwnd, XEvent *xev ) +@@ -1911,6 +1999,10 @@ BOOL X11DRV_GenericEvent( HWND hwnd, XEvent *xev ) case XI_RawMotion: ret = X11DRV_RawMotion( event ); break; @@ -227,7 +227,7 @@ index 7925a2f4070..fce58d2b48a 100644 default: TRACE( "Unhandled event %#x\n", event->evtype ); diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h -index d147add9d68..30486210df5 100644 +index 5778a7eceb4..36ed7810700 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -408,6 +408,7 @@ struct x11drv_thread_data diff --git a/staging/upstream-commit b/staging/upstream-commit index 5fc79663..293cb3ef 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -2238658e2f87506c9ccb67de0376f3e3920550db +900dfca3899d52f3085c713e26af06aa5aea37a4