From 30c9d5a0f8a6e8d166130d3f41f0ced0f6124c59 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Fri, 16 Apr 2021 00:26:25 -0500 Subject: [PATCH] Rebase against 39263558a2088940aaacd6eda19ca23d40b63495. --- ...storing-DOS-attributes-in-NtCreateFi.patch | 45 ++-- ...ntdll-Find-dangling-symlinks-quickly.patch | 41 ++- ...wine-prefix-from-reparse-point-paths.patch | 18 +- patches/patchinstall.sh | 33 +-- ...INPUT-parameter-to-__wine_send_input.patch | 236 ------------------ ...ign-rawinput-device-handle-in-HID_Li.patch | 69 ----- ...itialize-proxy-settings-registry-key.patch | 16 +- patches/wineboot-ProxySettings/definition | 1 - ...stem32-drivers-etc-host-networks-pro.patch | 68 ----- patches/wineboot-drivers_etc_Stubs/definition | 1 - staging/upstream-commit | 2 +- 11 files changed, 54 insertions(+), 476 deletions(-) delete mode 100644 patches/user32-rawinput-hid/0003-user32-Add-RAWINPUT-parameter-to-__wine_send_input.patch delete mode 100644 patches/user32-rawinput-hid/0004-hidclass.sys-Assign-rawinput-device-handle-in-HID_Li.patch delete mode 100644 patches/wineboot-drivers_etc_Stubs/0001-wineboot-Init-system32-drivers-etc-host-networks-pro.patch delete mode 100644 patches/wineboot-drivers_etc_Stubs/definition diff --git a/patches/ntdll-DOS_Attributes/0004-ntdll-Implement-storing-DOS-attributes-in-NtCreateFi.patch b/patches/ntdll-DOS_Attributes/0004-ntdll-Implement-storing-DOS-attributes-in-NtCreateFi.patch index d980d3c7..4624d1d6 100644 --- a/patches/ntdll-DOS_Attributes/0004-ntdll-Implement-storing-DOS-attributes-in-NtCreateFi.patch +++ b/patches/ntdll-DOS_Attributes/0004-ntdll-Implement-storing-DOS-attributes-in-NtCreateFi.patch @@ -1,15 +1,15 @@ -From 7e55aac8ffe313d8e313b222d1bc670b51987441 Mon Sep 17 00:00:00 2001 +From 02050df2d792e003c28a302d23e7a464573c113c Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Wed, 20 Aug 2014 15:28:00 -0600 Subject: [PATCH] ntdll: Implement storing DOS attributes in NtCreateFile. --- - dlls/ntdll/tests/directory.c | 24 +++++++-------- - dlls/ntdll/unix/file.c | 59 ++++++++++++++++++++++++++++++------ - 2 files changed, 61 insertions(+), 22 deletions(-) + dlls/ntdll/tests/directory.c | 24 ++++++++--------- + dlls/ntdll/unix/file.c | 51 ++++++++++++++++++++++++++++++++---- + 2 files changed, 57 insertions(+), 18 deletions(-) diff --git a/dlls/ntdll/tests/directory.c b/dlls/ntdll/tests/directory.c -index d21a2e64f8e..dc4f09729ac 100644 +index 6a423174664..fccd48f23e5 100644 --- a/dlls/ntdll/tests/directory.c +++ b/dlls/ntdll/tests/directory.c @@ -55,7 +55,6 @@ static NTSTATUS (WINAPI *pRtlWow64EnableFsRedirectionEx)( ULONG disable, ULONG * @@ -58,10 +58,10 @@ index d21a2e64f8e..dc4f09729ac 100644 } testfiles[i].nfound++; diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c -index 0c3ff240c67..57175c7f3e4 100644 +index b2494d0343a..ad39732fd29 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c -@@ -409,6 +409,26 @@ static int xattr_get( const char *path, const char *name, void *value, size_t si +@@ -407,6 +407,26 @@ static int xattr_get( const char *path, const char *name, void *value, size_t si #endif } @@ -88,7 +88,7 @@ index 0c3ff240c67..57175c7f3e4 100644 /* get space from the current directory data buffer, allocating a new one if necessary */ static void *get_dir_data_space( struct dir_data *data, unsigned int size ) { -@@ -3664,6 +3684,20 @@ static NTSTATUS unmount_device( HANDLE handle ) +@@ -3760,6 +3780,20 @@ static NTSTATUS unmount_device( HANDLE handle ) return status; } @@ -109,42 +109,27 @@ index 0c3ff240c67..57175c7f3e4 100644 /****************************************************************************** * open_unix_file -@@ -3706,6 +3740,7 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU - ULONG attributes, ULONG sharing, ULONG disposition, - ULONG options, void *ea_buffer, ULONG ea_length ) - { -+ OBJECT_ATTRIBUTES nt_attr; - UNICODE_STRING nt_name = { 0 }; - char *unix_name; - BOOL created = FALSE; -@@ -3749,17 +3784,17 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU +@@ -3854,13 +3888,14 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU io->u.Status = STATUS_SUCCESS; } - if (io->u.Status == STATUS_SUCCESS) + if (io->u.Status != STATUS_SUCCESS) { -- OBJECT_ATTRIBUTES nt_attr = *attr; -- -- if (nt_name.Buffer) nt_attr.ObjectName = &nt_name; -- io->u.Status = open_unix_file( handle, unix_name, access, &nt_attr, attributes, +- io->u.Status = open_unix_file( handle, unix_name, access, &new_attr, attributes, - sharing, disposition, options, ea_buffer, ea_length ); -- free( nt_name.Buffer ); - free( unix_name ); + WARN( "%s not found (%x)\n", debugstr_us(attr->ObjectName), io->u.Status ); + return io->u.Status; } - else WARN( "%s not found (%x)\n", debugstr_us(attr->ObjectName), io->u.Status ); + -+ nt_attr = *attr; -+ if (nt_name.Buffer) nt_attr.ObjectName = &nt_name; -+ io->u.Status = open_unix_file( handle, unix_name, access, &nt_attr, attributes, ++ io->u.Status = open_unix_file( handle, unix_name, access, &new_attr, attributes, + sharing, disposition, options, ea_buffer, ea_length ); -+ free( nt_name.Buffer ); if (io->u.Status == STATUS_SUCCESS) { -@@ -3781,6 +3816,11 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU +@@ -3882,6 +3917,11 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU io->Information = FILE_OVERWRITTEN; break; } @@ -156,14 +141,14 @@ index 0c3ff240c67..57175c7f3e4 100644 } else if (io->u.Status == STATUS_TOO_MANY_OPENED_FILES) { -@@ -3788,6 +3828,7 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU - if (!once++) ERR_(winediag)( "Too many open files, ulimit -n probably needs to be increased\n" ); +@@ -3890,6 +3930,7 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU } + free( nt_name.Buffer ); + free( unix_name ); return io->u.Status; } -- -2.20.1 +2.30.2 diff --git a/patches/ntdll-Junction_Points/0022-ntdll-Find-dangling-symlinks-quickly.patch b/patches/ntdll-Junction_Points/0022-ntdll-Find-dangling-symlinks-quickly.patch index 5b901090..ec566792 100644 --- a/patches/ntdll-Junction_Points/0022-ntdll-Find-dangling-symlinks-quickly.patch +++ b/patches/ntdll-Junction_Points/0022-ntdll-Find-dangling-symlinks-quickly.patch @@ -1,4 +1,4 @@ -From fdbd1834e06f2476c2798613e45f764e5eba8f9d Mon Sep 17 00:00:00 2001 +From 42675b2cbb3460a5c9fe57f6804d1f144fe27529 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Wed, 1 May 2019 17:48:51 -0600 Subject: [PATCH] ntdll: Find dangling symlinks quickly. @@ -8,40 +8,31 @@ case-insensitive lookups of files. Signed-off-by: Erich E. Hoover --- - dlls/ntdll/unix/file.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + dlls/ntdll/unix/file.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c -index f77e64ee6b4..0de80ebee7b 100644 +index 9654f31cf30..f5e968c369e 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c -@@ -2715,7 +2715,7 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i +@@ -2709,7 +2709,7 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i if (ret >= 0 && ret <= MAX_DIR_ENTRY_LEN) { unix_name[pos + ret] = 0; +- if (!stat( unix_name, &st )) return STATUS_SUCCESS; ++ if (!lstat( unix_name, &st )) return STATUS_SUCCESS; + } + if (check_case) goto not_found; /* we want an exact match */ + +@@ -3373,7 +3373,7 @@ static NTSTATUS lookup_unix_name( const WCHAR *name, int name_len, char **buffer + char *p; + unix_name[pos + 1 + ret] = 0; + for (p = unix_name + pos ; *p; p++) if (*p == '\\') *p = '/'; - if (!stat( unix_name, &st )) + if (!lstat( unix_name, &st )) { - if (is_win_dir) *is_win_dir = is_same_file( &windir, &st ); + if (disposition == FILE_CREATE) return STATUS_OBJECT_NAME_COLLISION; return STATUS_SUCCESS; -@@ -2819,7 +2819,7 @@ not_found: - return STATUS_OBJECT_PATH_NOT_FOUND; - - success: -- if (is_win_dir && !stat( unix_name, &st )) *is_win_dir = is_same_file( &windir, &st ); -+ if (is_win_dir && !lstat( unix_name, &st )) *is_win_dir = is_same_file( &windir, &st ); - return STATUS_SUCCESS; - } - -@@ -3359,7 +3359,7 @@ static NTSTATUS lookup_unix_name( const WCHAR *name, int name_len, char **buffer - for (p = unix_name + pos ; *p; p++) if (*p == '\\') *p = '/'; - if (!name_len || !redirect || (!strstr( unix_name, "/windows/") && strncmp( unix_name, "windows/", 8 ))) - { -- if (!stat( unix_name, &st )) -+ if (!lstat( unix_name, &st )) - { - if (disposition == FILE_CREATE) - return STATUS_OBJECT_NAME_COLLISION; -- -2.20.1 +2.30.2 diff --git a/patches/ntdll-Junction_Points/0036-ntdll-Strip-the-wine-prefix-from-reparse-point-paths.patch b/patches/ntdll-Junction_Points/0036-ntdll-Strip-the-wine-prefix-from-reparse-point-paths.patch index 2ecdbaa4..48d82a36 100644 --- a/patches/ntdll-Junction_Points/0036-ntdll-Strip-the-wine-prefix-from-reparse-point-paths.patch +++ b/patches/ntdll-Junction_Points/0036-ntdll-Strip-the-wine-prefix-from-reparse-point-paths.patch @@ -1,18 +1,18 @@ -From efd074f0e742ac8199b091860b2d4bc36136ca1c Mon Sep 17 00:00:00 2001 +From 4507201faf3a7993d4e8f214c5de081f4656ad5e Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Sat, 6 Feb 2021 16:15:46 -0700 Subject: [PATCH] ntdll: Strip the wine prefix from reparse point paths external to the prefix. --- - dlls/ntdll/unix/file.c | 27 +++++++++++++++++++++++++++ - 1 file changed, 27 insertions(+) + dlls/ntdll/unix/file.c | 29 +++++++++++++++++++++++++++++ + 1 file changed, 29 insertions(+) diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c -index b6e49590f62..25b542cb4fc 100644 +index b17b53146b3..614f37fb3d6 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c -@@ -5913,6 +5913,31 @@ static void ignore_server_ioctl_struct_holes( ULONG code, const void *in_buffer, +@@ -6051,6 +6051,33 @@ static void ignore_server_ioctl_struct_holes( ULONG code, const void *in_buffer, } @@ -23,13 +23,15 @@ index b6e49590f62..25b542cb4fc 100644 + + if (unix_root == NULL) + { ++ OBJECT_ATTRIBUTES attr; + UNICODE_STRING nameW; + WCHAR *nt_name; + + if (unix_to_nt_file_name( "/", &nt_name ) != STATUS_SUCCESS) return; + nameW.Buffer = nt_name; + nameW.Length = wcslen(nt_name) * sizeof(WCHAR); -+ nt_to_unix_file_name( &nameW, &unix_root, NULL, FILE_OPEN ); ++ InitializeObjectAttributes( &attr, &nameW, OBJ_CASE_INSENSITIVE, 0, NULL ); ++ nt_to_unix_file_name( &attr, &unix_root, FILE_OPEN ); + free( nt_name ); + if (unix_root == NULL) return; + unix_root_len = strlen(unix_root); @@ -44,7 +46,7 @@ index b6e49590f62..25b542cb4fc 100644 /* * Retrieve the unix name corresponding to a file handle, remove that directory, and then symlink * the requested directory to the location of the old directory. -@@ -6045,6 +6070,8 @@ NTSTATUS FILE_CreateSymlink(HANDLE handle, REPARSE_DATA_BUFFER *buffer) +@@ -6183,6 +6210,8 @@ NTSTATUS FILE_CreateSymlink(HANDLE handle, REPARSE_DATA_BUFFER *buffer) goto cleanup; } } @@ -54,5 +56,5 @@ index b6e49590f62..25b542cb4fc 100644 TRACE( "Linking %s to %s\n", unix_src, &unix_dest[relative_offset] ); -- -2.20.1 +2.30.2 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 60e3ad0a..0afdc41b 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -51,7 +51,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "092c7a09a5afde3f11b71b1816388e80d062e8ec" + echo "39263558a2088940aaacd6eda19ca23d40b63495" } # Show version information @@ -253,7 +253,6 @@ patch_enable_all () enable_wineboot_DriveSerial="$1" enable_wineboot_HKEY_DYN_DATA="$1" enable_wineboot_ProxySettings="$1" - enable_wineboot_drivers_etc_Stubs="$1" enable_winecfg_Libraries="$1" enable_winecfg_Staging="$1" enable_wined3d_Accounting="$1" @@ -817,9 +816,6 @@ patch_enable () wineboot-ProxySettings) enable_wineboot_ProxySettings="$2" ;; - wineboot-drivers_etc_Stubs) - enable_wineboot_drivers_etc_Stubs="$2" - ;; winecfg-Libraries) enable_winecfg_Libraries="$2" ;; @@ -1317,11 +1313,7 @@ if test "$enable_wineboot_ProxySettings" -eq 1; then if test "$enable_wineboot_DriveSerial" -gt 1; then abort "Patchset wineboot-DriveSerial disabled, but wineboot-ProxySettings depends on that." fi - if test "$enable_wineboot_drivers_etc_Stubs" -gt 1; then - abort "Patchset wineboot-drivers_etc_Stubs disabled, but wineboot-ProxySettings depends on that." - fi enable_wineboot_DriveSerial=1 - enable_wineboot_drivers_etc_Stubs=1 fi if test "$enable_user32_rawinput_mouse_experimental" -eq 1; then @@ -3851,16 +3843,11 @@ fi # | * [#50506] WM_INPUT messages are not received for HID devices registered with RegisterRawInputDevices # | # | Modified files: -# | * dlls/hidclass.sys/Makefile.in, dlls/hidclass.sys/device.c, dlls/hidclass.sys/hid.h, dlls/hidclass.sys/pnp.c, -# | dlls/ntoskrnl.exe/ntoskrnl.exe.spec, dlls/ntoskrnl.exe/pnp.c, dlls/user32/input.c, dlls/user32/message.c, -# | dlls/user32/rawinput.c, dlls/user32/user32.spec, dlls/user32/user_private.h, dlls/wineandroid.drv/keyboard.c, -# | dlls/wineandroid.drv/window.c, dlls/winemac.drv/ime.c, dlls/winemac.drv/keyboard.c, dlls/winemac.drv/mouse.c, -# | dlls/winex11.drv/keyboard.c, dlls/winex11.drv/mouse.c, include/ddk/wdm.h, include/winuser.h, server/protocol.def, +# | * dlls/hidclass.sys/Makefile.in, dlls/hidclass.sys/device.c, dlls/hidclass.sys/pnp.c, dlls/ntoskrnl.exe/ntoskrnl.exe.spec, +# | dlls/ntoskrnl.exe/pnp.c, dlls/user32/message.c, dlls/user32/rawinput.c, include/ddk/wdm.h, server/protocol.def, # | server/queue.c, server/trace.c # | if test "$enable_user32_rawinput_hid" -eq 1; then - patch_apply user32-rawinput-hid/0003-user32-Add-RAWINPUT-parameter-to-__wine_send_input.patch - patch_apply user32-rawinput-hid/0004-hidclass.sys-Assign-rawinput-device-handle-in-HID_Li.patch patch_apply user32-rawinput-hid/0005-hidclass.sys-Use-__wine_send_input-to-send-device-no.patch patch_apply user32-rawinput-hid/0006-server-Implement-desktop-broadcast-in-queue_rawinput.patch patch_apply user32-rawinput-hid/0007-server-Add-rawinput-union-to-hw_input_t-INPUT_HARDWA.patch @@ -4037,22 +4024,10 @@ if test "$enable_wineboot_HKEY_DYN_DATA" -eq 1; then patch_apply wineboot-HKEY_DYN_DATA/0001-wineboot-Add-some-generic-hardware-in-HKEY_DYN_DATA-.patch fi -# Patchset wineboot-drivers_etc_Stubs -# | -# | This patchset fixes the following Wine bugs: -# | * [#12076] Create stub files for system32/drivers/etc/{services,hosts,networks,protocol} -# | -# | Modified files: -# | * programs/wineboot/wineboot.c -# | -if test "$enable_wineboot_drivers_etc_Stubs" -eq 1; then - patch_apply wineboot-drivers_etc_Stubs/0001-wineboot-Init-system32-drivers-etc-host-networks-pro.patch -fi - # Patchset wineboot-ProxySettings # | # | This patchset has the following (direct or indirect) dependencies: -# | * wineboot-DriveSerial, wineboot-drivers_etc_Stubs +# | * wineboot-DriveSerial # | # | This patchset fixes the following Wine bugs: # | * [#42024] Create ProxyEnable key on wineprefix update diff --git a/patches/user32-rawinput-hid/0003-user32-Add-RAWINPUT-parameter-to-__wine_send_input.patch b/patches/user32-rawinput-hid/0003-user32-Add-RAWINPUT-parameter-to-__wine_send_input.patch deleted file mode 100644 index 1e67e54a..00000000 --- a/patches/user32-rawinput-hid/0003-user32-Add-RAWINPUT-parameter-to-__wine_send_input.patch +++ /dev/null @@ -1,236 +0,0 @@ -From e37a301a9492b6f9ea418556c7df703899a8be58 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?R=C3=A9mi=20Bernon?= -Date: Wed, 7 Apr 2021 14:52:00 +0200 -Subject: [PATCH] user32: Add RAWINPUT parameter to __wine_send_input. - -And send_hardware_message. - -This makes it possible to use __wine_send_input to send extended input -data, such as HID device notifications and WM_INPUT messages carrying -HID reports. - -Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50506 ---- - dlls/user32/input.c | 6 +++--- - dlls/user32/message.c | 2 +- - dlls/user32/user32.spec | 2 +- - dlls/user32/user_private.h | 2 +- - dlls/wineandroid.drv/keyboard.c | 2 +- - dlls/wineandroid.drv/window.c | 4 ++-- - dlls/winemac.drv/ime.c | 4 ++-- - dlls/winemac.drv/keyboard.c | 2 +- - dlls/winemac.drv/mouse.c | 2 +- - dlls/winex11.drv/keyboard.c | 2 +- - dlls/winex11.drv/mouse.c | 8 ++++---- - include/winuser.h | 2 +- - 12 files changed, 19 insertions(+), 19 deletions(-) - -diff --git a/dlls/user32/input.c b/dlls/user32/input.c -index 7cf7e53a6c8..805bfe3e9de 100644 ---- a/dlls/user32/input.c -+++ b/dlls/user32/input.c -@@ -119,9 +119,9 @@ BOOL set_capture_window( HWND hwnd, UINT gui_flags, HWND *prev_ret ) - * - * Internal SendInput function to allow the graphics driver to inject real events. - */ --BOOL CDECL __wine_send_input( HWND hwnd, const INPUT *input ) -+BOOL CDECL __wine_send_input( HWND hwnd, const INPUT *input, const RAWINPUT *rawinput ) - { -- NTSTATUS status = send_hardware_message( hwnd, input, 0 ); -+ NTSTATUS status = send_hardware_message( hwnd, input, rawinput, 0 ); - if (status) SetLastError( RtlNtStatusToDosError(status) ); - return !status; - } -@@ -210,7 +210,7 @@ UINT WINAPI SendInput( UINT count, LPINPUT inputs, int size ) - update_mouse_coords( &input ); - /* fallthrough */ - case INPUT_KEYBOARD: -- status = send_hardware_message( 0, &input, SEND_HWMSG_INJECTED ); -+ status = send_hardware_message( 0, &input, NULL, SEND_HWMSG_INJECTED ); - break; - case INPUT_HARDWARE: - SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); -diff --git a/dlls/user32/message.c b/dlls/user32/message.c -index def59998a52..f87ef9fb3af 100644 ---- a/dlls/user32/message.c -+++ b/dlls/user32/message.c -@@ -3227,7 +3227,7 @@ static BOOL send_message( struct send_message_info *info, DWORD_PTR *res_ptr, BO - /*********************************************************************** - * send_hardware_message - */ --NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, UINT flags ) -+NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *rawinput, UINT flags ) - { - struct user_key_state_info *key_state_info = get_user_thread_info()->key_state; - struct send_message_info info; -diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec -index 4ef75247d71..190ee74fd6c 100644 ---- a/dlls/user32/user32.spec -+++ b/dlls/user32/user32.spec -@@ -834,5 +834,5 @@ - # All functions must be prefixed with '__wine_' (for internal functions) - # or 'wine_' (for user-visible functions) to avoid namespace conflicts. - # --@ cdecl __wine_send_input(long ptr) -+@ cdecl __wine_send_input(long ptr ptr) - @ cdecl __wine_set_pixel_format(long long) -diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h -index 7761a1ceb4f..dfd52421e66 100644 ---- a/dlls/user32/user_private.h -+++ b/dlls/user32/user_private.h -@@ -263,7 +263,7 @@ extern RECT get_virtual_screen_rect(void) DECLSPEC_HIDDEN; - extern LRESULT call_current_hook( HHOOK hhook, INT code, WPARAM wparam, LPARAM lparam ) DECLSPEC_HIDDEN; - extern DWORD get_input_codepage( void ) DECLSPEC_HIDDEN; - extern BOOL map_wparam_AtoW( UINT message, WPARAM *wparam, enum wm_char_mapping mapping ) DECLSPEC_HIDDEN; --extern NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, UINT flags ) DECLSPEC_HIDDEN; -+extern NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *rawinput, UINT flags ) DECLSPEC_HIDDEN; - extern LRESULT MSG_SendInternalMessageTimeout( 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 1c8a1e4f68f..0a6ede0ec5f 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.u.ki.time = 0; - input.u.ki.dwExtraInfo = 0; - -- __wine_send_input( hwnd, &input ); -+ __wine_send_input( hwnd, &input, NULL ); - } - - /*********************************************************************** -diff --git a/dlls/wineandroid.drv/window.c b/dlls/wineandroid.drv/window.c -index 79bc471a984..1cb1bbbadc9 100644 ---- a/dlls/wineandroid.drv/window.c -+++ b/dlls/wineandroid.drv/window.c -@@ -521,7 +521,7 @@ static int process_events( DWORD mask ) - } - SERVER_END_REQ; - } -- __wine_send_input( capture ? capture : event->data.motion.hwnd, &event->data.motion.input ); -+ __wine_send_input( capture ? capture : event->data.motion.hwnd, &event->data.motion.input, NULL ); - } - break; - -@@ -535,7 +535,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 ); -- __wine_send_input( 0, &event->data.kbd.input ); -+ __wine_send_input( 0, &event->data.kbd.input, NULL ); - break; - - default: -diff --git a/dlls/winemac.drv/ime.c b/dlls/winemac.drv/ime.c -index dabe6654f98..f2368c10743 100644 ---- a/dlls/winemac.drv/ime.c -+++ b/dlls/winemac.drv/ime.c -@@ -1427,10 +1427,10 @@ void macdrv_im_set_text(const macdrv_event *event) - { - input.ki.wScan = chars[i]; - input.ki.dwFlags = KEYEVENTF_UNICODE; -- __wine_send_input(hwnd, &input); -+ __wine_send_input(hwnd, &input, NULL); - - input.ki.dwFlags = KEYEVENTF_UNICODE | KEYEVENTF_KEYUP; -- __wine_send_input(hwnd, &input); -+ __wine_send_input(hwnd, &input, NULL); - } - } - -diff --git a/dlls/winemac.drv/keyboard.c b/dlls/winemac.drv/keyboard.c -index 1b74300e93a..1ea15f59341 100644 ---- a/dlls/winemac.drv/keyboard.c -+++ b/dlls/winemac.drv/keyboard.c -@@ -929,7 +929,7 @@ static void macdrv_send_keyboard_input(HWND hwnd, WORD vkey, WORD scan, DWORD fl - input.ki.time = time; - input.ki.dwExtraInfo = 0; - -- __wine_send_input(hwnd, &input); -+ __wine_send_input(hwnd, &input, NULL); - } - - -diff --git a/dlls/winemac.drv/mouse.c b/dlls/winemac.drv/mouse.c -index dd6443fe1ba..d2278ae0e4c 100644 ---- a/dlls/winemac.drv/mouse.c -+++ b/dlls/winemac.drv/mouse.c -@@ -165,7 +165,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); -+ __wine_send_input(top_level_hwnd, &input, NULL); - } - - -diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c -index 35a801fc895..01620c5e4a4 100644 ---- a/dlls/winex11.drv/keyboard.c -+++ b/dlls/winex11.drv/keyboard.c -@@ -1148,7 +1148,7 @@ static void X11DRV_send_keyboard_input( HWND hwnd, WORD vkey, WORD scan, DWORD f - input.u.ki.time = time; - input.u.ki.dwExtraInfo = 0; - -- __wine_send_input( hwnd, &input ); -+ __wine_send_input( hwnd, &input, NULL ); - } - - -diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c -index 94dece652b6..42bac332664 100644 ---- a/dlls/winex11.drv/mouse.c -+++ b/dlls/winex11.drv/mouse.c -@@ -659,7 +659,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU - sync_window_cursor( window ); - last_cursor_change = input->u.mi.time; - } -- __wine_send_input( hwnd, input ); -+ __wine_send_input( hwnd, input, NULL ); - return; - } - -@@ -699,7 +699,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU - SERVER_END_REQ; - } - -- __wine_send_input( hwnd, input ); -+ __wine_send_input( hwnd, input, NULL ); - } - - #ifdef SONAME_LIBXCURSOR -@@ -1669,7 +1669,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 = GetTickCount(); - input.u.mi.dwExtraInfo = 0; -- __wine_send_input( hwnd, &input ); -+ __wine_send_input( hwnd, &input, NULL ); - } - - while (PeekMessageW( &msg, 0, 0, 0, PM_REMOVE )) -@@ -1900,7 +1900,7 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev ) - TRACE( "pos %d,%d (event %f,%f)\n", input.u.mi.dx, input.u.mi.dy, dx, dy ); - - input.type = INPUT_MOUSE; -- __wine_send_input( 0, &input ); -+ __wine_send_input( 0, &input, NULL ); - return TRUE; - } - -diff --git a/include/winuser.h b/include/winuser.h -index 53661f6c788..0b1571c0a95 100644 ---- a/include/winuser.h -+++ b/include/winuser.h -@@ -4406,7 +4406,7 @@ static inline BOOL WINAPI SetRectEmpty(LPRECT rect) - WORD WINAPI SYSTEM_KillSystemTimer( WORD ); - - #ifdef __WINESRC__ --WINUSERAPI BOOL CDECL __wine_send_input( HWND hwnd, const INPUT *input ); -+WINUSERAPI BOOL CDECL __wine_send_input( HWND hwnd, const INPUT *input, const RAWINPUT *rawinput ); - #endif - - #ifdef __cplusplus --- -2.30.2 - diff --git a/patches/user32-rawinput-hid/0004-hidclass.sys-Assign-rawinput-device-handle-in-HID_Li.patch b/patches/user32-rawinput-hid/0004-hidclass.sys-Assign-rawinput-device-handle-in-HID_Li.patch deleted file mode 100644 index 329ec7c4..00000000 --- a/patches/user32-rawinput-hid/0004-hidclass.sys-Assign-rawinput-device-handle-in-HID_Li.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 1da5b77304f9ef71340692a9d3d6e95526101ea6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?R=C3=A9mi=20Bernon?= -Date: Mon, 22 Mar 2021 18:41:55 +0100 -Subject: [PATCH] hidclass.sys: Assign rawinput device handle in - HID_LinkDevice. - -The handles are just numeric values and not real object handles, they -are used in the hDevice field of the RAWINPUTHEADER struct. - -They will also be used as an HID rawinput device array index on the -server side. - -Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50506 ---- - dlls/hidclass.sys/device.c | 17 +++++++++++++++++ - dlls/hidclass.sys/hid.h | 1 + - 2 files changed, 18 insertions(+) - -diff --git a/dlls/hidclass.sys/device.c b/dlls/hidclass.sys/device.c -index fc1dfd07db1..9a3c92b3576 100644 ---- a/dlls/hidclass.sys/device.c -+++ b/dlls/hidclass.sys/device.c -@@ -71,6 +71,17 @@ NTSTATUS HID_CreateDevice(DEVICE_OBJECT *native_device, HID_MINIDRIVER_REGISTRAT - return STATUS_SUCCESS; - } - -+/* user32 reserves 1 & 2 for winemouse and winekeyboard, -+ * keep this in sync with user_private.h */ -+#define WINE_MOUSE_HANDLE 1 -+#define WINE_KEYBOARD_HANDLE 2 -+ -+static UINT32 alloc_rawinput_handle(void) -+{ -+ static LONG counter = WINE_KEYBOARD_HANDLE + 1; -+ return InterlockedIncrement(&counter); -+} -+ - NTSTATUS HID_LinkDevice(DEVICE_OBJECT *device) - { - WCHAR device_instance_id[MAX_DEVICE_ID_LEN]; -@@ -125,7 +136,13 @@ NTSTATUS HID_LinkDevice(DEVICE_OBJECT *device) - { - if (!IoRegisterDeviceInterface(device, &GUID_DEVINTERFACE_MOUSE, NULL, &ext->mouse_link_name)) - ext->is_mouse = TRUE; -+ ext->rawinput_handle = WINE_MOUSE_HANDLE; - } -+ else if (ext->preparseData->caps.UsagePage == HID_USAGE_PAGE_GENERIC -+ && ext->preparseData->caps.Usage == HID_USAGE_GENERIC_KEYBOARD) -+ ext->rawinput_handle = WINE_KEYBOARD_HANDLE; -+ else -+ ext->rawinput_handle = alloc_rawinput_handle(); - - return STATUS_SUCCESS; - -diff --git a/dlls/hidclass.sys/hid.h b/dlls/hidclass.sys/hid.h -index 889b8c625c0..41f3766a535 100644 ---- a/dlls/hidclass.sys/hid.h -+++ b/dlls/hidclass.sys/hid.h -@@ -51,6 +51,7 @@ typedef struct _BASE_DEVICE_EXTENSION { - struct ReportRingBuffer *ring_buffer; - HANDLE halt_event; - HANDLE thread; -+ UINT32 rawinput_handle; - - KSPIN_LOCK irp_queue_lock; - LIST_ENTRY irp_queue; --- -2.30.2 - diff --git a/patches/wineboot-ProxySettings/0001-wineboot-Initialize-proxy-settings-registry-key.patch b/patches/wineboot-ProxySettings/0001-wineboot-Initialize-proxy-settings-registry-key.patch index 34b86cf7..591185bd 100644 --- a/patches/wineboot-ProxySettings/0001-wineboot-Initialize-proxy-settings-registry-key.patch +++ b/patches/wineboot-ProxySettings/0001-wineboot-Initialize-proxy-settings-registry-key.patch @@ -1,4 +1,4 @@ -From 4e43757350f1104b73d6aef09fd277ef8a245412 Mon Sep 17 00:00:00 2001 +From 16060eb72cc435d6073f1e4cd6b73093b16ac972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Mon, 26 Dec 2016 16:37:40 +0100 Subject: [PATCH] wineboot: Initialize proxy settings registry key. @@ -22,7 +22,7 @@ index 2552f69990a..769ad7ee511 100644 EXTRADLLFLAGS = -mno-cygwin diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c -index 119fef90c10..05d695a7d4a 100644 +index 8d2050c2f4b..c79bab3a25c 100644 --- a/programs/wineboot/wineboot.c +++ b/programs/wineboot/wineboot.c @@ -78,6 +78,7 @@ @@ -33,7 +33,7 @@ index 119fef90c10..05d695a7d4a 100644 #include #include "resource.h" -@@ -1032,6 +1033,13 @@ static void create_volatile_environment_registry_key(void) +@@ -933,6 +934,13 @@ static void create_volatile_environment_registry_key(void) RegCloseKey( hkey ); } @@ -44,10 +44,10 @@ index 119fef90c10..05d695a7d4a 100644 + if (inet) InternetCloseHandle( inet ); +} + - static void create_etc_stub_files(void) - { - static const WCHAR drivers_etcW[] = {'\\','d','r','i','v','e','r','s','\\','e','t','c',0}; -@@ -1877,6 +1885,7 @@ int __cdecl main( int argc, char *argv[] ) + /* Performs the rename operations dictated in %SystemRoot%\Wininit.ini. + * Returns FALSE if there was an error, or otherwise if all is ok. + */ +@@ -1742,6 +1750,7 @@ int __cdecl main( int argc, char *argv[] ) if (init || update) update_wineprefix( update ); create_volatile_environment_registry_key(); @@ -56,5 +56,5 @@ index 119fef90c10..05d695a7d4a 100644 ProcessRunKeys( HKEY_LOCAL_MACHINE, L"RunOnce", TRUE, TRUE ); -- -2.28.0 +2.30.2 diff --git a/patches/wineboot-ProxySettings/definition b/patches/wineboot-ProxySettings/definition index 745166e5..4990a283 100644 --- a/patches/wineboot-ProxySettings/definition +++ b/patches/wineboot-ProxySettings/definition @@ -1,3 +1,2 @@ Fixes: [42024] Create ProxyEnable key on wineprefix update -Depends: wineboot-drivers_etc_Stubs Depends: wineboot-DriveSerial diff --git a/patches/wineboot-drivers_etc_Stubs/0001-wineboot-Init-system32-drivers-etc-host-networks-pro.patch b/patches/wineboot-drivers_etc_Stubs/0001-wineboot-Init-system32-drivers-etc-host-networks-pro.patch deleted file mode 100644 index 5b7ac0ba..00000000 --- a/patches/wineboot-drivers_etc_Stubs/0001-wineboot-Init-system32-drivers-etc-host-networks-pro.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 047267c6f3ce198fb7e3d28f086c3c23b6fd275e Mon Sep 17 00:00:00 2001 -From: Sebastian Lackner -Date: Wed, 13 May 2015 06:58:16 +0200 -Subject: [PATCH] wineboot: Init - system32/drivers/etc/{host,networks,protocol,services}. - -Based on a patch by Jactry Zeng. ---- - programs/wineboot/wineboot.c | 36 ++++++++++++++++++++++++++++++++++++ - 1 file changed, 36 insertions(+) - -diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c -index 0f8ddc2a0ea..958bf3039a0 100644 ---- a/programs/wineboot/wineboot.c -+++ b/programs/wineboot/wineboot.c -@@ -702,6 +702,41 @@ static void create_volatile_environment_registry_key(void) - RegCloseKey( hkey ); - } - -+static void create_etc_stub_files(void) -+{ -+ static const WCHAR drivers_etcW[] = {'\\','d','r','i','v','e','r','s','\\','e','t','c',0}; -+ static const WCHAR hostsW[] = {'h','o','s','t','s',0}; -+ static const WCHAR networksW[] = {'n','e','t','w','o','r','k','s',0}; -+ static const WCHAR protocolW[] = {'p','r','o','t','o','c','o','l',0}; -+ static const WCHAR servicesW[] = {'s','e','r','v','i','c','e','s',0}; -+ static const WCHAR *files[] = { hostsW, networksW, protocolW, servicesW }; -+ WCHAR path[MAX_PATH + sizeof(drivers_etcW)/sizeof(WCHAR) + 32]; -+ DWORD i, path_len; -+ HANDLE file; -+ -+ GetSystemDirectoryW( path, MAX_PATH ); -+ lstrcatW( path, drivers_etcW ); -+ path_len = lstrlenW( path ); -+ -+ if (!CreateDirectoryW( path, NULL ) && GetLastError() != ERROR_ALREADY_EXISTS) -+ return; -+ -+ path[ path_len++ ] = '\\'; -+ for (i = 0; i < sizeof(files) / sizeof(files[0]); i++) -+ { -+ path[ path_len ] = 0; -+ lstrcatW( path, files[i] ); -+ if (PathFileExistsW( path )) continue; -+ -+ file = CreateFileW( path, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, -+ NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL ); -+ if (file == INVALID_HANDLE_VALUE) -+ WINE_ERR( "wine: failed to create %s.\n", wine_dbgstr_w(path) ); -+ else -+ CloseHandle( file ); -+ } -+} -+ - /* Performs the rename operations dictated in %SystemRoot%\Wininit.ini. - * Returns FALSE if there was an error, or otherwise if all is ok. - */ -@@ -1385,6 +1420,7 @@ static void update_wineprefix( BOOL force ) - } - install_root_pnp_devices(); - update_user_profile(); -+ create_etc_stub_files(); - - WINE_MESSAGE( "wine: configuration in %s has been updated.\n", debugstr_w(prettyprint_configdir()) ); - } --- -2.17.1 - diff --git a/patches/wineboot-drivers_etc_Stubs/definition b/patches/wineboot-drivers_etc_Stubs/definition deleted file mode 100644 index 96d2be68..00000000 --- a/patches/wineboot-drivers_etc_Stubs/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [12076] Create stub files for system32/drivers/etc/{services,hosts,networks,protocol} diff --git a/staging/upstream-commit b/staging/upstream-commit index 595714c8..faafac06 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -092c7a09a5afde3f11b71b1816388e80d062e8ec +39263558a2088940aaacd6eda19ca23d40b63495