├── .gitignore ├── .git-blame-ignore-revs ├── patches ├── 9999-diffs │ ├── xbell-disable.patch │ ├── disable-ime.patch │ ├── thread-characteristic-audio-priority.patch │ ├── per-source-cflags.patch │ ├── overwatch-heap-alloc-opt.patch │ ├── opt-get_magic_handle.patch │ ├── fix-debug-longlong-printing.patch │ ├── qpc-support-hardcode.patch │ ├── quieten-sys-perf-info.patch │ ├── fix-duplicate-kbmsg.patch │ ├── enable-dynamic-spinning.patch │ ├── omit-leaf-frame-pointers.patch │ ├── winsta-cache.patch │ ├── audio_driver_envar.patch │ └── fsync-opt-semaphore-retry.patch ├── 9989-misc │ ├── ps0454-p0001-include-Add-SYSCALL-calling-convention.patch │ ├── ps0059-msi-Fix-page-fault-when-a-patch-does-not-contain-a.patch │ ├── ps0465-p0002-riched20-update-caret-on-zooming.patch │ ├── ps0013-riched20-Properly-initialize-variable-valgrind.patch │ ├── ps0173-kernelbase-always-return-NULL-in-case-of-error-in-.patch │ ├── ps0466-Update-dlls-ntdll-wcstring.c.patch │ ├── ps0014-p0002-ntdll-RtlGetNtProductType-should-not-validat.patch │ ├── ps0069-p0001-ntdll-Always-use-case-insensitive-object-nam.patch │ ├── ps0452-p0002-kernelbase-Increase-buffer-size-in-compare_s.patch │ ├── ps0444-p0001-kernel32-Enable-LFH-in-HeapCreate.patch │ ├── ps0264-p0002-server-Enable-link-time-optimization.patch │ ├── ps0295-p0007-combase-Don-t-use-attr.ObjectName-after-call.patch │ ├── ps0350-ntdll-Map-ETXTBSY-to-STATUS_SHARING_VIOLATION.patch │ ├── ps0122-p0005-ntdll-Initialize-USR1-handler-XSTATE-buffer-.patch │ ├── ps0432-wineboot-Relax-TSC-frequency-calibration-error-to-.patch │ ├── ps0056-p0002-widl-open-files-to-write-in-binary-mode.patch │ ├── ps0275-p0006-ntdll-Remove-extra-call-to-getenv-from-virtu.patch │ ├── ps0177-p0007-ntdll-Do-not-lock-loader-in-RtlPcToFileHeade.patch │ ├── ps0051-winevulkan-Don-t-support-VK_EXT_headless_surface.patch │ ├── ps0475-ntdll-Exclude-more-environment-variables-from-Window.patch │ ├── ps0444-p0003-kernelbase-Enable-LFH-in-HeapCreate.patch │ ├── ps0445-p0011-include-Add-a-comment-explaining-why-all-ker.patch │ ├── ps0410-p0004-win32u-Set-the-default-gamma-value-to-1400.patch │ ├── ps0281-p0001-configure.ac-Add-fasynchronous-unwind-tables.patch │ ├── ps0322-p0012-loader-Enable-dumping-additional-vectors-in-.patch │ ├── ps0030-p0003-wineboot-Check-GetTokenInformation-return-va.patch │ ├── ps0244-p0002-WIP-ntdll-Lookup-short-file-name-extension-f.patch │ ├── ps0232-shell32-Fixed-a-rename-behavior.patch │ ├── ps0400-winepulse.drv-Don-t-add-a-period-to-real_bufsize_b.patch │ ├── ps0054-windowscodecs-Support-RGBA-BMP-format.patch │ ├── ps0234-p0004-ext-ms-mf-pal-l2-1-0-Add-new-dll.patch │ ├── ps0040-hidclass.sys-Fix-a-leak-in-hid_device_thread.patch │ ├── ps0075-conhost-Delay-load-gdi32-and-user32.patch │ ├── ps0296-server-implement-file-random-access-hint-on-OS-X.patch │ ├── ps0005-shell32-Partially-implement-ShellLink_AddDataBlock.patch │ ├── ps0366-winex11.drv-Fix-crash-when-ctx-is-NULL-in-glxdrv_w.patch │ ├── ps0399-configure-Mark-CROSSCC-precious.patch │ ├── ps0030-p0004-winetest-Check-GetTokenInformation-return-va.patch │ ├── ps0177-p0002-ntoskrnl-Don-t-take-loader-lock-in-find_ldr_.patch │ ├── ps0115-twain_32-Fix-crash-by-call-TWAIN_UserSelect-twice.patch │ ├── ps0087-p0003-msxml3-Don-t-force-UTF-8-when-saving-XML-doc.patch │ ├── ps0244-p0004-WIP-ntdll-Add-a-fast-path-for-ASCII-lower-up.patch │ ├── ps0174-p0003-ddraw-Declare-the-same-number-of-planes-as-c.patch │ ├── ps0175-p0002-win32u-ensure-init_region-sets-pReg-fields-o.patch │ ├── ps0065-conhost-Keep-horizontal-position-of-cursor-within-.patch │ ├── ps0435-p0005-HACK-server-Do-not-use-an-atomic-instruction.patch │ ├── ps0030-p0002-userenv-Check-GetTokenInformation-return-val.patch │ ├── ps0406-p0002-dlls-kernelbase-fix-CreateProcess-with-CREAT.patch │ ├── ps0322-p0013-loader-Enable-all-remap-logic-by-default.patch │ ├── ps0204-loader-Create-performance-winsat-datastore-on-pref.patch │ ├── ps0443-wineboot-Print-more-information-when-TSC-calibrati.patch │ ├── ps0441-p0002-ntdll-Add-5-byte-nop-to-start-of-KiUserCallb.patch │ ├── ps0470-p0003-mmdevapi-copy-ContainerID-from-audio-driver-.patch │ ├── ps0073-winex11.drv-Add-missing-Vulkan-extensions.patch │ ├── ps0262-p0002-programs-winedbg-don-t-allocate-a-new-consol.patch │ ├── ps0435-p0007-STAGING-server-Propagate-main-thread-schedul.patch │ ├── ps0460-ntdll-unix-Init-the-trap-handler.patch │ ├── ps0470-p0002-mmdevapi-decode-ContainerId-property-to-CLSI.patch │ ├── ps0022-p0002-kernel32-tests-Add-mutex-tests-with-8-bit-ch.patch │ ├── ps0044-conhost-Add-the-case-where-the-divisor-is-0.patch │ ├── ps0387-p0002-ntdll-Make-server_select-a-memory-barrier.patch │ ├── ps0034-ntdll-Add-SIGQUIT-to-server-block-set.patch │ ├── ps0174-p0005-ntoskrnl.exe-Make-user-shared-data-pointers-.patch │ ├── ps0079-shell32-Use-CP_UTF8-in-__SHCloneStrAtoW.-Fix-probl.patch │ ├── ps0312-p0001-wdscore-Fix-spec-entries.patch │ ├── ps0325-ntdll-Only-call-wine-exception-handlers-on-the-cur.patch │ ├── ps0030-p0001-msi-Properly-check-GetTokenInformation-retur.patch │ ├── ps0055-ntdll-Only-build-Linux-specific-functions-on-Linux.patch │ ├── ps0380-ntoskrnl-Free-memory-before-pointer-gets-set-to-NU.patch │ ├── ps0102-ntdll-Use-RTLD_NOLOAD-to-find-already-mapped-modul.patch │ ├── ps0257-p0002-ntdll-Add-DECLSPEC_HOTPATCH-to-strrchr.patch │ ├── ps0114-winebuild-Clear-RFLAGS-before-entering-syscall.patch │ ├── ps0289-conhost-Fix-status-for-READ_CONSOLE-ioctl.patch │ ├── ps0018-p0002-user32-Clear-last-error-if-loading-an-icon-s.patch │ └── ps0310-configure-add-rpath-for-Unix-libs.patch ├── 0011-rbernon-patches │ ├── 9989-misc │ │ ├── ps0089-winex11.drv-Fix-focus-delay-issues-with-desktop-cl.patch │ │ └── ps0088-p0001-user32-Update-rawinput-device-list-in-WM_DEV.patch │ ├── 0009-wip-clipcursor-v1 │ │ ├── 0004-winex11.drv-Always-set-the-clipping-window-cursor-wh.patch │ │ ├── 0003-server-Notify-desktop-of-cursor-window-changes.patch │ │ └── 0006-user32-Notify-the-driver-of-icon-destruction-before-.patch │ ├── 0005-wip-focustime-v1 │ │ └── 0004-winex11.drv-Reset-XInput2-valuators-only-on-DeviceCh.patch │ ├── 0012-wip-user32-tests │ │ ├── 0010-user32-tests-Add-broken-w1064v1809-mouse-input-test-.patch │ │ ├── 0006-user32-tests-Ignore-internal-messages-in-GetMessageP.patch │ │ └── 0008-user32-tests-Wait-indefinitely-for-the-child-process.patch │ ├── 0002-wip-vulkan-child-v1 │ │ └── 0014-winex11.drv-Don-t-consider-swapchain-less-Vulkan-sur.patch │ ├── 0003-wip-setactivewindow-v1 │ │ └── 0009-Revert-fixup-user32-tests-Test-a-recursive-activatio.patch │ ├── 0000-reverts │ │ ├── 0001-Revert-user32-Before-asking-a-WM-to-activate-a-windo.patch │ │ ├── 0008-Revert-server-Clear-the-MOUSEEVENTF_-ABSOLUTE-VIRTUA.patch │ │ └── 0007-Revert-user32-Add-support-for-absolute-rawinput-mess.patch │ ├── 0007-wip-rawinput-v1 │ │ ├── 0006-user32-Add-support-for-absolute-rawinput-messages.patch │ │ ├── 0005-server-Clear-the-MOUSEEVENTF_-ABSOLUTE-VIRTUALDESK-f.patch │ │ └── 0007-server-Stop-enforcing-relative-rawinput-mouse-positi.patch │ ├── 0011-bug-17173-v4 │ │ └── 0006-winex11.drv-Restore-pointer-grab-on-FocusIn-events.patch │ └── 0013-wip-wm-cancelmode │ │ └── 0002-winemac.drv-Only-send-WM_CANCELMODE-if-a-menu-is-act.patch ├── 0001-qpc-opt │ ├── 0001-ntdll-Read-Qpc-frequency-from-user-shared-data.patch │ ├── 0005-hal-Prefer-RtlQueryPerformanceCounter-over-NtQueryPe.patch │ ├── 0007-winmm-Only-call-QueryPerformanceFrequency-once.patch │ ├── 0004-ntdll-Prefer-RtlQueryPerformanceCounter-over-NtQuery.patch │ └── 0006-kernelbase-Prefer-RtlQueryPerformanceCounter-over-Nt.patch ├── 0002-fastsync │ ├── 0027-server-Add-a-message-to-signal-that-fast-synchroniza.patch │ ├── 0026-server-Allow-disabling-fast-synchronization-support.patch │ └── 0024-ntdll-Use-server_wait_for_object-when-waiting-on-onl.patch ├── 0015-gdi │ ├── ps0008-p0003-add-a-skip-log-when-there-is-no-simsun-font-.patch │ ├── ps0022-p0003--HACK-win32u-Don-t-call-font_init-in-font_Cr.patch │ ├── ps0003-win32u-fix-another-font-base_font-regression.patch │ ├── ps0012-gdi32-Accept-16-bit-handles-in-get_dc_attr.patch │ └── ps0002-p0009-win32u-Print-full-bitmap-size-in-the-font-li.patch ├── 0018-gst-decoders │ └── ps0009-p0006-HACK-winegstreamer-Fail-to-plug-elements-whe.patch ├── 0010-shared-memory │ ├── 0023-win32u-Yield-thread-in-peek_message-when-no-message-.patch │ ├── 0002-server-Use-the-helper-to-update-the-cursor-last-chan.patch │ ├── 0040-server-Only-return-full-keystate-when-requested.patch │ └── 0042-win32u-Use-input-shared-memory-in-NtUserGetKeyboardS.patch ├── 0017-networking-and-browser │ ├── ps0037-iphlpapi-Return-ERROR_NO_DATA-from-GetIpNetTable-i.patch │ ├── ps0016-nsiproxy.sys-Only-use-SIN_ROUTER-when-available.patch │ ├── ps0019-iphlpapi-In-dns_info_alloc-prevent-usage-of-uninit.patch │ ├── ps0034-p0001-include-Add-definition-for-GetBestRoute2.patch │ └── ps0010-netprofm-set-ret-NULL-if-no-more-connections.patch ├── 0012-window-input-and-control-handling │ ├── ps0077-winex11.drv-Fix-import-XA_STRING-compatible-wide-c.patch │ ├── ps0066-win32u-Fix-event-queue-congestion-can-cause-WINPOS.patch │ ├── ps0020-winex11.drv-Only-send-state-changes-for-updated-wm.patch │ ├── ps0041-winex11.drv-Flush-X-connection-after-ungrabbing-th.patch │ ├── ps0093-p0001-win32u-Clear-validate-flag-if-both-internal-.patch │ ├── ps0112-p0001-winex11.drv-Always-call-XSync-in-destroy_who.patch │ ├── ps0037-winex11.drv-Do-not-call-old_error_handler-if-it-is.patch │ ├── ps0026-comdlg32-The-app-might-strcmp-api-filter.patch │ ├── ps0006-p0002-win32u-Fix-a-pop-up-window-is-not-visible-wh.patch │ ├── ps0118-Server-Synchronise-keystate-when-locking-input-whe.patch │ ├── ps0117-winex11.drv-Don-t-call-XGetAtomName-if-the-result-.patch │ ├── ps0033-win32u-Send-WM_NCCALCSIZE-message-when-a-new-windo.patch │ ├── ps0015-comdlg32-Fix-the-wrong-popup-when-saving-the-same-.patch │ ├── ps0008-p0001-comctl32-Don-t-redraw-the-Combo-Box-when-dro.patch │ ├── ps0101-winex11.drv-Change-fullscreen-state-even-when-proc.patch │ ├── ps0069-p0003-riched20-tests-Add-extra-test-for-IRichEditO.patch │ ├── ps0048-winex11.drv-Fix-window-state-error-when-WS_MAXIMIZ.patch │ ├── ps0056-p0001-win32u-Don-t-fire-EVENT_OBJECT_CREATE-for-di.patch │ ├── ps0014-comctl32-listview-If-there-is-no-scroll-bar-no-nee.patch │ ├── ps0039-win32u-The-parent-window-with-WS_CLIPCHILDREN-styl.patch │ ├── ps0023-win32u-No-need-to-change-the-z-order-of-the-foregr.patch │ ├── ps0055-winex11.drv-When-mapping-a-layered-window-make-sur.patch │ ├── ps0092-winex11.drv-Call-XRaiseWindow-during-WM_TAKE_FOCUS.patch │ └── ps0115-winex11.drv-optimize-repeated-ClipCursor-calls.patch ├── 0014-crypto │ ├── ps0003-secur32-Disable-CHACHA20-POLY1305-ciphersuites.patch │ └── ps0005-crypt32-Hash-the-SubjectPublicKeyInfo-as-fallback-.patch ├── 0006-thread-priority │ └── 0003-server-Map-THREAD_PRIORITY_IDLE-to-SCHED_IDLE.patch ├── 0013-meta-files │ ├── ps0005-include-Add-new-fields-for-SYSTEM_PEFORMANCE_INFOR.patch │ ├── ps0013-makedep-Add-various-lib-.a-targets-to-make-all.patch │ └── ps0002-include-Add-include-guard-in-devguid.h.patch └── 0005-reflink │ └── 0004-lmshare.h-define-STYPE_TEMPORARY.patch ├── config ├── wine-tkg.cfg ├── debug-msgs.cfg ├── ccache.cfg ├── patches.cfg └── tmpfs.cfg └── user.cfg /.gitignore: -------------------------------------------------------------------------------- 1 | /*.*patch 2 | /*.*revert 3 | *.*_ 4 | *~ 5 | *.bak 6 | **/*_/ 7 | -------------------------------------------------------------------------------- /.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | # Initial rebase/cleaning of all the patches. 2 | 71265c718240ceff46ed31fb080d73c54e52f938 3 | -------------------------------------------------------------------------------- /patches/9999-diffs/xbell-disable.patch: -------------------------------------------------------------------------------- 1 | diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c 2 | index 11111111111..11111111111 100644 3 | --- a/dlls/winex11.drv/keyboard.c 4 | +++ b/dlls/winex11.drv/keyboard.c 5 | @@ -2707,5 +2707,5 @@ found: 6 | */ 7 | void X11DRV_Beep(void) 8 | { 9 | - XBell(gdi_display, 0); 10 | + /*XBell(gdi_display, 0);*/ 11 | } 12 | -------------------------------------------------------------------------------- /config/wine-tkg.cfg: -------------------------------------------------------------------------------- 1 | #!/hint/bash 2 | # shellcheck disable=SC2034 3 | 4 | ### Main config ### 5 | 6 | basedir="$(CDPATH='' cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)" 7 | configdir="${basedir}/config" 8 | patchdir="${basedir}/patches" 9 | 10 | . "${configdir}/basic.cfg" 11 | . "${configdir}/advanced.cfg" 12 | . "${configdir}/ccache.cfg" 13 | . "${configdir}/debug-msgs.cfg" 14 | . "${configdir}/patches.cfg" 15 | . "${configdir}/rebase.cfg" 16 | #. "${configdir}/tmpfs.cfg" 17 | -------------------------------------------------------------------------------- /patches/9999-diffs/disable-ime.patch: -------------------------------------------------------------------------------- 1 | diff --git a/dlls/win32u/imm.c b/dlls/win32u/imm.c 2 | index 11111111111..11111111111 100644 3 | --- a/dlls/win32u/imm.c 4 | +++ b/dlls/win32u/imm.c 5 | @@ -53,7 +53,7 @@ struct imm_thread_data 6 | 7 | static struct list thread_data_list = LIST_INIT( thread_data_list ); 8 | static pthread_mutex_t imm_mutex = PTHREAD_MUTEX_INITIALIZER; 9 | -static BOOL disable_ime; 10 | +static BOOL disable_ime = TRUE; 11 | 12 | static struct imc *get_imc_ptr( HIMC handle ) 13 | { 14 | -------------------------------------------------------------------------------- /patches/9999-diffs/thread-characteristic-audio-priority.patch: -------------------------------------------------------------------------------- 1 | diff --git a/dlls/avrt/main.c b/dlls/avrt/main.c 2 | index 11111111111..11111111111 100644 3 | --- a/dlls/avrt/main.c 4 | +++ b/dlls/avrt/main.c 5 | @@ -71,6 +71,9 @@ HANDLE WINAPI AvSetMmThreadCharacteristicsW(const WCHAR *name, DWORD *index) 6 | return NULL; 7 | } 8 | 9 | + if (!wcscmp(name, L"Audio") || !wcscmp(name, L"Pro Audio")) 10 | + SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL); 11 | + 12 | return (HANDLE)0x12345678; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /patches/9999-diffs/per-source-cflags.patch: -------------------------------------------------------------------------------- 1 | diff --git a/tools/makedep.c b/tools/makedep.c 2 | index 11111111111..11111111111 100644 3 | --- a/tools/makedep.c 4 | +++ b/tools/makedep.c 5 | @@ -3164,6 +3164,7 @@ static void output_source_one_arch( struct makefile *make, struct incl_file *sou 6 | 7 | output_filenames( cpp_flags ); 8 | output_filename( arch_make_variable( "CFLAGS", arch )); 9 | + output_filename( arch_make_variable( strmake( "%s_CFLAGS", basename( obj ) ), arch )); 10 | output( "\n" ); 11 | 12 | if (make->testdll && !is_dll_src && strendswith( source->name, ".c" ) && 13 | -------------------------------------------------------------------------------- /patches/9999-diffs/overwatch-heap-alloc-opt.patch: -------------------------------------------------------------------------------- 1 | diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c 2 | index 11111111111..11111111111 100644 3 | --- a/dlls/ntdll/heap.c 4 | +++ b/dlls/ntdll/heap.c 5 | @@ -176,7 +176,7 @@ C_ASSERT( HEAP_MAX_SMALL_FREE_LIST % BLOCK_ALIGN == 0 ); 6 | /* Max size of the blocks on the free lists above HEAP_MAX_SMALL_FREE_LIST */ 7 | static const SIZE_T free_list_sizes[] = 8 | { 9 | - 0x200, 0x400, 0x1000, ~(SIZE_T)0 10 | + 0x200, 0x400, 0x800, 0x1000, 0x2000, 0x4000, 0x8000, 0x10000, 0x20000, 0x40000, ~(SIZE_T)0 11 | }; 12 | #define HEAP_NB_FREE_LISTS (ARRAY_SIZE(free_list_sizes) + HEAP_NB_SMALL_FREE_LISTS) 13 | 14 | -------------------------------------------------------------------------------- /patches/9999-diffs/opt-get_magic_handle.patch: -------------------------------------------------------------------------------- 1 | diff --git a/server/handle.c b/server/handle.c 2 | index 11111111111..11111111111 100644 3 | --- a/server/handle.c 4 | +++ b/server/handle.c 5 | @@ -447,6 +447,13 @@ unsigned int close_handle( struct process *process, obj_handle_t handle ) 6 | /* retrieve the object corresponding to one of the magic pseudo-handles */ 7 | static inline struct object *get_magic_handle( obj_handle_t handle ) 8 | { 9 | +#ifdef __GNUC__ 10 | + if (__builtin_expect(!(handle & 0xc0000000), 1)) 11 | +#else 12 | + if (!(handle & 0xc0000000)) 13 | +#endif 14 | + return NULL; 15 | + 16 | switch(handle) 17 | { 18 | case 0xfffffffa: /* current thread impersonation token pseudo-handle */ 19 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0454-p0001-include-Add-SYSCALL-calling-convention.patch: -------------------------------------------------------------------------------- 1 | From 08fba3115ad459fe0566c044f802672cfd2a4051 Mon Sep 17 00:00:00 2001 2 | From: Torge Matthies 3 | Date: Thu, 8 Dec 2022 20:33:30 +0100 4 | Subject: [PATCH 1/5] include: Add SYSCALL calling convention. 5 | 6 | --- 7 | include/windef.h | 2 ++ 8 | 1 file changed, 2 insertions(+) 9 | 10 | diff --git a/include/windef.h b/include/windef.h 11 | index 11111111111..11111111111 100644 12 | --- a/include/windef.h 13 | +++ b/include/windef.h 14 | @@ -200,6 +200,8 @@ extern "C" { 15 | #define APIENTRY WINAPI 16 | #define CONST __ONLY_IN_WINELIB(const) 17 | 18 | +#define SYSCALL WINAPI 19 | + 20 | /* Misc. constants. */ 21 | 22 | #ifndef NULL 23 | -- 24 | 2.40.0 25 | 26 | -------------------------------------------------------------------------------- /patches/9999-diffs/fix-debug-longlong-printing.patch: -------------------------------------------------------------------------------- 1 | patches/9989-misc/ps0043-p0001-ntdll-Redirect-wine_dbg_log-printf-formattin.patch 2 | 3 | diff --git a/include/wine/debug.h b/include/wine/debug.h 4 | index 11111111111..11111111111 100644 5 | --- a/include/wine/debug.h 6 | +++ b/include/wine/debug.h 7 | @@ -346,7 +346,7 @@ static inline const char *wine_dbgstr_rect( const RECT *rect ) 8 | static inline const char *wine_dbgstr_longlong( ULONGLONG ll ) 9 | { 10 | if (sizeof(ll) > sizeof(unsigned long) && ll >> 32) 11 | - return wine_dbg_sprintf( "%lx%08lx", (unsigned long)(ll >> 32), (unsigned long)ll ); 12 | + return wine_dbg_sprintf( "%x%08x", (unsigned int)(ll >> 32), (unsigned int)(ll & 0xFFFFFFFF) ); 13 | else return wine_dbg_sprintf( "%lx", (unsigned long)ll ); 14 | } 15 | 16 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0059-msi-Fix-page-fault-when-a-patch-does-not-contain-a.patch: -------------------------------------------------------------------------------- 1 | Subject: [PATCH] msi: Fix page fault when a patch does not contain a cabinet. 2 | 3 | Taken from https://bugs.winehq.org/show_bug.cgi?id=50148 4 | 5 | diff --git a/dlls/msi/files.c b/dlls/msi/files.c 6 | index 11111111111..11111111111 100644 7 | --- a/dlls/msi/files.c 8 | +++ b/dlls/msi/files.c 9 | @@ -819,7 +819,7 @@ UINT ACTION_PatchFiles( MSIPACKAGE *package ) 10 | data.cb = patchfiles_cb; 11 | data.user = &cursor; 12 | 13 | - if (!msi_cabextract( package, mi, &data )) 14 | + if (mi->cabinet && !msi_cabextract( package, mi, &data )) 15 | { 16 | ERR("Failed to extract cabinet: %s\n", debugstr_w(mi->cabinet)); 17 | rc = ERROR_INSTALL_FAILURE; 18 | -------------------------------------------------------------------------------- /patches/0011-rbernon-patches/9989-misc/ps0089-winex11.drv-Fix-focus-delay-issues-with-desktop-cl.patch: -------------------------------------------------------------------------------- 1 | From 9cb62bbd95fd782825772d65e568fb1baa667c50 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Thu, 28 Jan 2021 14:05:48 +0100 4 | Subject: [PATCH] winex11.drv: Fix focus delay issues with desktop clipping. 5 | 6 | --- 7 | dlls/winex11.drv/event.c | 1 + 8 | 1 file changed, 1 insertion(+) 9 | 10 | diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c 11 | index 11111111111..11111111111 100644 12 | --- a/dlls/winex11.drv/event.c 13 | +++ b/dlls/winex11.drv/event.c 14 | @@ -333,6 +333,7 @@ static int try_grab_pointer( Display *display ) 15 | return 0; 16 | 17 | XUngrabPointer( display, CurrentTime ); 18 | + XFlush( display ); 19 | return 1; 20 | } 21 | 22 | -------------------------------------------------------------------------------- /config/debug-msgs.cfg: -------------------------------------------------------------------------------- 1 | #!/hint/bash 2 | # shellcheck disable=SC2034 3 | 4 | ### Wine debug message option ### 5 | 6 | if [ "x${_frogminer_disable_msgs:-false}" = 'xtrue' ]; then 7 | # Disable some warnings that error out 8 | _frogminer_wno_error=(unused-variable unused-but-set-variable unused-const-variable) 9 | # Disable trace and debug messages 10 | _frogminer_no_msgs=(WINE_NO_TRACE_MSGS WINE_NO_DEBUG_MSGS) 11 | 12 | _frogminer_extraflags=("${_frogminer_wno_error[@]/#/-Wno-}" "${_frogminer_no_msgs[@]/#/-D}") 13 | _GCC_FLAGS="${_GCC_FLAGS} ${_frogminer_extraflags[*]}" 14 | _LD_FLAGS="${_LD_FLAGS} ${_frogminer_extraflags[*]}" 15 | _CROSS_FLAGS="${_CROSS_FLAGS} ${_frogminer_extraflags[*]}" 16 | _CROSS_LDFLAGS="${_CROSS_LDFLAGS} ${_frogminer_extraflags[*]}" 17 | export CPPFLAGS="${CPPFLAGS} ${_frogminer_extraflags[*]}" 18 | fi 19 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0465-p0002-riched20-update-caret-on-zooming.patch: -------------------------------------------------------------------------------- 1 | From 30eb3196ad10cb25ea259bf32460ee863e044dca Mon Sep 17 00:00:00 2001 2 | From: David Kahurani 3 | Date: Wed, 10 Aug 2022 15:43:31 +0300 4 | Subject: [PATCH 2/2] riched20: update caret on zooming 5 | 6 | Signed-off-by: David Kahurani 7 | --- 8 | dlls/riched20/paint.c | 2 ++ 9 | 1 file changed, 2 insertions(+) 10 | 11 | diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/riched20/paint.c 14 | +++ b/dlls/riched20/paint.c 15 | @@ -1321,5 +1321,7 @@ ME_SetZoom(ME_TextEditor *editor, int numerator, int denominator) 16 | editor->nZoomDenominator = denominator; 17 | 18 | ME_RewrapRepaint(editor); 19 | + update_caret( editor ); 20 | + 21 | return TRUE; 22 | } 23 | -- 24 | 2.40.0 25 | 26 | -------------------------------------------------------------------------------- /patches/9999-diffs/qpc-support-hardcode.patch: -------------------------------------------------------------------------------- 1 | diff --git a/dlls/ntdll/time.c b/dlls/ntdll/time.c 2 | index 11111111111..11111111111 100644 3 | --- a/dlls/ntdll/time.c 4 | +++ b/dlls/ntdll/time.c 5 | @@ -392,12 +392,12 @@ static UINT64 multiply_tsc(UINT64 a, UINT64 b) 6 | */ 7 | BOOL WINAPI DECLSPEC_HOTPATCH RtlQueryPerformanceCounter( LARGE_INTEGER *counter ) 8 | { 9 | - if (user_shared_data->u3.QpcBypassEnabled & SHARED_GLOBAL_FLAGS_QPC_BYPASS_ENABLED) 10 | + if (1 || user_shared_data->u3.QpcBypassEnabled & SHARED_GLOBAL_FLAGS_QPC_BYPASS_ENABLED) 11 | { 12 | unsigned __int64 tsc; 13 | unsigned int aux; 14 | 15 | - if (user_shared_data->u3.QpcBypassEnabled & SHARED_GLOBAL_FLAGS_QPC_BYPASS_USE_RDTSCP) 16 | + if (1 || user_shared_data->u3.QpcBypassEnabled & SHARED_GLOBAL_FLAGS_QPC_BYPASS_USE_RDTSCP) 17 | tsc = __rdtscp(&aux); 18 | else 19 | { 20 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0013-riched20-Properly-initialize-variable-valgrind.patch: -------------------------------------------------------------------------------- 1 | From: Fabian Maurer 2 | Subject: [PATCH v2] riched20: Properly initialize variable (valgrind) 3 | Message-Id: <20200219150523.188428-1-dark.shadow4@web.de> 4 | Date: Wed, 19 Feb 2020 16:05:23 +0100 5 | 6 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48628 7 | Signed-off-by: Fabian Maurer 8 | --- 9 | dlls/riched20/editor.c | 1 + 10 | 1 file changed, 1 insertion(+) 11 | 12 | diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c 13 | index 11111111111..11111111111 100644 14 | --- a/dlls/riched20/editor.c 15 | +++ b/dlls/riched20/editor.c 16 | @@ -422,6 +422,7 @@ void ME_RTFCharAttrHook(RTF_Info *info) 17 | fmt.cbSize = sizeof(fmt); 18 | fmt.dwMask = 0; 19 | fmt.dwEffects = 0; 20 | + memset(fmt.szFaceName, 0, sizeof(fmt.szFaceName)); 21 | 22 | switch(info->rtfMinor) 23 | { 24 | -------------------------------------------------------------------------------- /patches/0001-qpc-opt/0001-ntdll-Read-Qpc-frequency-from-user-shared-data.patch: -------------------------------------------------------------------------------- 1 | From 5af21c994fd138b05f3357870b19f69b7f15612f Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Thu, 4 Mar 2021 10:25:28 +0100 4 | Subject: [PATCH 1/9] ntdll: Read Qpc frequency from user shared data. 5 | 6 | --- 7 | dlls/ntdll/time.c | 2 +- 8 | 1 file changed, 1 insertion(+), 1 deletion(-) 9 | 10 | diff --git a/dlls/ntdll/time.c b/dlls/ntdll/time.c 11 | index 11111111111..11111111111 100644 12 | --- a/dlls/ntdll/time.c 13 | +++ b/dlls/ntdll/time.c 14 | @@ -392,7 +392,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH RtlQueryPerformanceCounter( LARGE_INTEGER *counter 15 | */ 16 | BOOL WINAPI DECLSPEC_HOTPATCH RtlQueryPerformanceFrequency( LARGE_INTEGER *frequency ) 17 | { 18 | - frequency->QuadPart = TICKSPERSEC; 19 | + frequency->QuadPart = user_shared_data->QpcFrequency; 20 | return TRUE; 21 | } 22 | 23 | -------------------------------------------------------------------------------- /patches/0001-qpc-opt/0005-hal-Prefer-RtlQueryPerformanceCounter-over-NtQueryPe.patch: -------------------------------------------------------------------------------- 1 | From 6977fdc4cd9776ea80fa0957f87486cead4fb889 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Thu, 4 Mar 2021 10:51:05 +0100 4 | Subject: [PATCH 5/9] hal: Prefer RtlQueryPerformanceCounter over 5 | NtQueryPerformanceCounter. 6 | 7 | --- 8 | dlls/hal/hal.c | 3 ++- 9 | 1 file changed, 2 insertions(+), 1 deletion(-) 10 | 11 | diff --git a/dlls/hal/hal.c b/dlls/hal/hal.c 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/hal/hal.c 14 | +++ b/dlls/hal/hal.c 15 | @@ -193,6 +193,7 @@ ULONGLONG WINAPI KeQueryPerformanceCounter(LARGE_INTEGER *frequency) 16 | 17 | TRACE("(%p)\n", frequency); 18 | 19 | - NtQueryPerformanceCounter(&counter, frequency); 20 | + RtlQueryPerformanceFrequency(frequency); 21 | + RtlQueryPerformanceCounter(&counter); 22 | return counter.QuadPart; 23 | } 24 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0173-kernelbase-always-return-NULL-in-case-of-error-in-.patch: -------------------------------------------------------------------------------- 1 | From: Eric Pouech 2 | Subject: [PATCH] kernelbase: always return NULL in case of error in GetModuleHandleA (GCC11) 3 | Message-Id: <163276099958.288139.244684879015273005.stgit@euterpe> 4 | Date: Mon, 27 Sep 2021 18:43:21 +0200 5 | 6 | Signed-off-by: Eric Pouech 7 | 8 | --- 9 | dlls/kernelbase/loader.c | 2 +- 10 | 1 file changed, 1 insertion(+), 1 deletion(-) 11 | 12 | diff --git a/dlls/kernelbase/loader.c b/dlls/kernelbase/loader.c 13 | index 11111111111..11111111111 100644 14 | --- a/dlls/kernelbase/loader.c 15 | +++ b/dlls/kernelbase/loader.c 16 | @@ -337,7 +337,7 @@ done: 17 | */ 18 | HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA( LPCSTR module ) 19 | { 20 | - HMODULE ret; 21 | + HMODULE ret = NULL; 22 | 23 | GetModuleHandleExA( GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, module, &ret ); 24 | return ret; 25 | 26 | -------------------------------------------------------------------------------- /patches/0002-fastsync/0027-server-Add-a-message-to-signal-that-fast-synchroniza.patch: -------------------------------------------------------------------------------- 1 | From e9eb084d52dd008a9b3cb454a0ac66fb15d881ae Mon Sep 17 00:00:00 2001 2 | From: Zebediah Figura 3 | Date: Sun, 14 Mar 2021 11:08:02 -0500 4 | Subject: [PATCH 27/29] server: Add a message to signal that fast 5 | synchronization is indeed active. 6 | 7 | --- 8 | server/fast_sync.c | 4 ++++ 9 | 1 file changed, 4 insertions(+) 10 | 11 | diff --git a/server/fast_sync.c b/server/fast_sync.c 12 | index 11111111111..11111111111 100644 13 | --- a/server/fast_sync.c 14 | +++ b/server/fast_sync.c 15 | @@ -411,6 +411,10 @@ DECL_HANDLER(get_linux_sync_obj) 16 | { 17 | #ifdef HAVE_LINUX_WINESYNC_H 18 | struct object *obj; 19 | + static int once; 20 | + 21 | + if (!once++) 22 | + fprintf( stderr, "wine: using fast synchronization.\n" ); 23 | 24 | if ((obj = get_handle_obj( current->process, req->handle, 0, NULL ))) 25 | { 26 | -- 27 | 2.40.0 28 | 29 | -------------------------------------------------------------------------------- /patches/0015-gdi/ps0008-p0003-add-a-skip-log-when-there-is-no-simsun-font-.patch: -------------------------------------------------------------------------------- 1 | From d511219ce13077cd853afaf24d51152e1d07f9cf Mon Sep 17 00:00:00 2001 2 | From: Keming Liang 3 | Date: Mon, 6 Mar 2023 14:45:00 +0800 4 | Subject: [PATCH 3/3] add a skip log when there is no simsun font in test env. 5 | 6 | --- 7 | dlls/gdi32/tests/font.c | 2 ++ 8 | 1 file changed, 2 insertions(+) 9 | 10 | diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c 11 | index 11111111111..11111111111 100644 12 | --- a/dlls/gdi32/tests/font.c 13 | +++ b/dlls/gdi32/tests/font.c 14 | @@ -7861,6 +7861,8 @@ START_TEST(font) 15 | test_EnumFontFamiliesW(L"SimSun", DEFAULT_CHARSET); 16 | test_EnumFontFamiliesW(L"MS Shell Dlg", DEFAULT_CHARSET); 17 | } 18 | + else 19 | + skip("SimSun is not installed\n"); 20 | } 21 | 22 | /* On Windows Arial has a lot of default charset aliases such as Arial Cyr, 23 | -- 24 | 2.40.0 25 | 26 | -------------------------------------------------------------------------------- /patches/0015-gdi/ps0022-p0003--HACK-win32u-Don-t-call-font_init-in-font_Cr.patch: -------------------------------------------------------------------------------- 1 | From 1aae126f5ce62ab68a82da47e7da4fe763f0de49 Mon Sep 17 00:00:00 2001 2 | From: Torge Matthies 3 | Date: Sun, 5 Mar 2023 09:47:25 +0100 4 | Subject: [PATCH 3/4] [HACK] win32u: Don't call font_init in font_CreateDC. 5 | 6 | --- 7 | dlls/win32u/font.c | 2 -- 8 | 1 file changed, 2 deletions(-) 9 | 10 | diff --git a/dlls/win32u/font.c b/dlls/win32u/font.c 11 | index 11111111111..11111111111 100644 12 | --- a/dlls/win32u/font.c 13 | +++ b/dlls/win32u/font.c 14 | @@ -3251,8 +3251,6 @@ static BOOL CDECL font_CreateDC( PHYSDEV *dev, LPCWSTR device, LPCWSTR output, 15 | { 16 | struct font_physdev *physdev; 17 | 18 | - pthread_once( &font_init_once, font_init ); 19 | - if (!font_funcs) return TRUE; 20 | if (!(physdev = calloc( 1, sizeof(*physdev) ))) return FALSE; 21 | push_dc_driver( dev, &physdev->dev, &font_driver ); 22 | return TRUE; 23 | -- 24 | 2.40.0 25 | 26 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0466-Update-dlls-ntdll-wcstring.c.patch: -------------------------------------------------------------------------------- 1 | From 8d5a16dd8df4eee4739ce019f6e9899fbff411a1 Mon Sep 17 00:00:00 2001 2 | From: li wenzhe <584592187@qq.com> 3 | Date: Thu, 9 Mar 2023 10:27:42 +0000 4 | Subject: [PATCH] Update dlls/ntdll/wcstring.c 5 | 6 | --- 7 | dlls/ntdll/wcstring.c | 7 ++++++- 8 | 1 file changed, 6 insertions(+), 1 deletion(-) 9 | 10 | diff --git a/dlls/ntdll/wcstring.c b/dlls/ntdll/wcstring.c 11 | index 11111111111..11111111111 100644 12 | --- a/dlls/ntdll/wcstring.c 13 | +++ b/dlls/ntdll/wcstring.c 14 | @@ -353,7 +353,12 @@ int __cdecl wcsncmp( LPCWSTR str1, LPCWSTR str2, size_t n ) 15 | LPWSTR __cdecl wcsncpy( LPWSTR s1, LPCWSTR s2, size_t n ) 16 | { 17 | WCHAR *ret = s1; 18 | - for ( ; n; n--) if (!(*s1++ = *s2++)) break; 19 | + for ( ; n; n--) { 20 | + if (!(*s1++ = *s2++)) { 21 | + n--; 22 | + break; 23 | + } 24 | + } 25 | for ( ; n; n--) *s1++ = 0; 26 | return ret; 27 | } 28 | -- 29 | 2.40.0 30 | 31 | -------------------------------------------------------------------------------- /patches/0015-gdi/ps0003-win32u-fix-another-font-base_font-regression.patch: -------------------------------------------------------------------------------- 1 | From: "Rafał Mużyło" 2 | Subject: [PATCH] win32u: fix another font->base_font regression 3 | Message-Id: <20201114153442.GA3329@blackspire3> 4 | Date: Sat, 14 Nov 2020 16:34:42 +0100 5 | 6 | This regression has pretty much the same reason as the other recent one. 7 | Simply reverting to the properly working code. 8 | 9 | Signed-off-by: Rafał Mużyło 10 | 11 | diff --git a/dlls/win32u/font.c b/dlls/win32u/font.c 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/win32u/font.c 14 | +++ b/dlls/win32u/font.c 15 | @@ -3826,6 +3826,7 @@ static UINT get_glyph_index_linked( struct gdi_font **font, UINT glyph ) 16 | struct gdi_font *child; 17 | UINT res; 18 | 19 | + if ((*font)->base_font) *font = (*font)->base_font; 20 | if ((res = get_glyph_index( *font, glyph ))) return res; 21 | if (glyph < 32) return 0; /* don't check linked fonts for control characters */ 22 | 23 | 24 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0014-p0002-ntdll-RtlGetNtProductType-should-not-validat.patch: -------------------------------------------------------------------------------- 1 | From: Serge Gautherie 2 | Subject: [PATCH 2/2] ntdll: RtlGetNtProductType() should not validate 'type' parameter. 3 | Message-Id: <20200228111118.3832-1-winehq-git_serge_180711@gautherie.fr> 4 | Date: Fri, 28 Feb 2020 12:11:18 +0100 5 | 6 | Signed-off-by: Serge Gautherie 7 | --- 8 | dlls/ntdll/version.c | 2 +- 9 | 1 file changed, 1 insertion(+), 1 deletion(-) 10 | 11 | diff --git a/dlls/ntdll/version.c b/dlls/ntdll/version.c 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/ntdll/version.c 14 | +++ b/dlls/ntdll/version.c 15 | @@ -639,7 +639,7 @@ void WINAPI RtlGetNtVersionNumbers( LPDWORD major, LPDWORD minor, LPDWORD build 16 | */ 17 | BOOLEAN WINAPI RtlGetNtProductType( LPDWORD type ) 18 | { 19 | - if (type) *type = current_version->wProductType; 20 | + *type = current_version->wProductType; 21 | return TRUE; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0069-p0001-ntdll-Always-use-case-insensitive-object-nam.patch: -------------------------------------------------------------------------------- 1 | From 847c666156a8bbf16782ecc9d702763d2115fb62 Mon Sep 17 00:00:00 2001 2 | From: Zebediah Figura 3 | Date: Sun, 1 Nov 2020 15:04:43 -0600 4 | Subject: [PATCH 1/1] ntdll: Always use case-insensitive object name lookup in 5 | NtCreateFile(). 6 | 7 | --- 8 | dlls/ntdll/unix/file.c | 1 + 9 | 1 file changed, 1 insertion(+) 10 | 11 | diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/ntdll/unix/file.c 14 | +++ b/dlls/ntdll/unix/file.c 15 | @@ -5110,6 +5110,7 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU 16 | if (alloc_size) FIXME( "alloc_size not supported\n" ); 17 | 18 | new_attr = *attr; 19 | + new_attr.Attributes |= OBJ_CASE_INSENSITIVE; 20 | if (options & FILE_OPEN_BY_FILE_ID) 21 | { 22 | status = file_id_to_unix_file_name( &new_attr, &unix_name, &nt_name ); 23 | -- 24 | 2.40.0 25 | 26 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0452-p0002-kernelbase-Increase-buffer-size-in-compare_s.patch: -------------------------------------------------------------------------------- 1 | From de08512c9c50983279d1979542c51db1bf031bda Mon Sep 17 00:00:00 2001 2 | From: Torge Matthies 3 | Date: Sat, 26 Nov 2022 21:44:45 +0100 4 | Subject: [PATCH 2/2] kernelbase: Increase buffer size in compare_string. 5 | 6 | --- 7 | dlls/kernelbase/locale.c | 4 ++-- 8 | 1 file changed, 2 insertions(+), 2 deletions(-) 9 | 10 | diff --git a/dlls/kernelbase/locale.c b/dlls/kernelbase/locale.c 11 | index 11111111111..11111111111 100644 12 | --- a/dlls/kernelbase/locale.c 13 | +++ b/dlls/kernelbase/locale.c 14 | @@ -3829,8 +3829,8 @@ static int compare_string( const struct sortguid *sortid, DWORD flags, 15 | { 16 | struct sortkey_state s1; 17 | struct sortkey_state s2; 18 | - BYTE primary1[32]; 19 | - BYTE primary2[32]; 20 | + BYTE primary1[256]; 21 | + BYTE primary2[256]; 22 | int i, ret, len, pos1 = 0, pos2 = 0; 23 | BOOL have_extra1, have_extra2; 24 | BYTE case_mask = 0x3f; 25 | -- 26 | 2.40.0 27 | 28 | -------------------------------------------------------------------------------- /patches/9999-diffs/quieten-sys-perf-info.patch: -------------------------------------------------------------------------------- 1 | diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c 2 | index 11111111111..11111111111 100644 3 | --- a/dlls/ntdll/unix/system.c 4 | +++ b/dlls/ntdll/unix/system.c 5 | @@ -2744,7 +2744,6 @@ NTSTATUS SYSCALL NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class, 6 | case SystemPerformanceInformation: /* 2 */ 7 | { 8 | SYSTEM_PERFORMANCE_INFORMATION spi; 9 | - static BOOL fixme_written = FALSE; 10 | 11 | get_performance_info( &spi ); 12 | len = sizeof(spi); 13 | @@ -2754,10 +2753,7 @@ NTSTATUS SYSCALL NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class, 14 | else memcpy( info, &spi, len); 15 | } 16 | else ret = STATUS_INFO_LENGTH_MISMATCH; 17 | - if(!fixme_written) { 18 | - FIXME("info_class SYSTEM_PERFORMANCE_INFORMATION\n"); 19 | - fixme_written = TRUE; 20 | - } 21 | + WARN("info_class SYSTEM_PERFORMANCE_INFORMATION\n"); 22 | break; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /patches/0001-qpc-opt/0007-winmm-Only-call-QueryPerformanceFrequency-once.patch: -------------------------------------------------------------------------------- 1 | From 0b23c1488f302577e17dd8d1821f524959e6bcb3 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Thu, 4 Mar 2021 12:39:58 +0100 4 | Subject: [PATCH 7/9] winmm: Only call QueryPerformanceFrequency once. 5 | 6 | --- 7 | dlls/winmm/time.c | 5 +++-- 8 | 1 file changed, 3 insertions(+), 2 deletions(-) 9 | 10 | diff --git a/dlls/winmm/time.c b/dlls/winmm/time.c 11 | index 11111111111..11111111111 100644 12 | --- a/dlls/winmm/time.c 13 | +++ b/dlls/winmm/time.c 14 | @@ -254,10 +254,11 @@ MMRESULT WINAPI timeGetSystemTime(LPMMTIME lpTime, UINT wSize) 15 | */ 16 | DWORD WINAPI timeGetTime(void) 17 | { 18 | - LARGE_INTEGER now, freq; 19 | + static LARGE_INTEGER freq; 20 | + LARGE_INTEGER now; 21 | 22 | + if (!freq.QuadPart) QueryPerformanceFrequency(&freq); 23 | QueryPerformanceCounter(&now); 24 | - QueryPerformanceFrequency(&freq); 25 | 26 | return (now.QuadPart * 1000) / freq.QuadPart; 27 | } 28 | -------------------------------------------------------------------------------- /patches/0002-fastsync/0026-server-Allow-disabling-fast-synchronization-support.patch: -------------------------------------------------------------------------------- 1 | From eebf785d7d80da0cfbadd70416fa7ee06377ef19 Mon Sep 17 00:00:00 2001 2 | From: Zebediah Figura 3 | Date: Sat, 13 Mar 2021 16:20:30 -0600 4 | Subject: [PATCH 26/29] server: Allow disabling fast synchronization support. 5 | 6 | --- 7 | server/fast_sync.c | 6 ++++++ 8 | 1 file changed, 6 insertions(+) 9 | 10 | diff --git a/server/fast_sync.c b/server/fast_sync.c 11 | index 11111111111..11111111111 100644 12 | --- a/server/fast_sync.c 13 | +++ b/server/fast_sync.c 14 | @@ -128,6 +128,12 @@ static struct linux_device *get_linux_device(void) 15 | struct linux_device *device; 16 | int unix_fd; 17 | 18 | + if (getenv( "WINE_DISABLE_FAST_SYNC" ) && atoi( getenv( "WINE_DISABLE_FAST_SYNC" ) )) 19 | + { 20 | + set_error( STATUS_NOT_IMPLEMENTED ); 21 | + return NULL; 22 | + } 23 | + 24 | if (linux_device_object) 25 | return (struct linux_device *)grab_object( linux_device_object ); 26 | 27 | -- 28 | 2.40.0 29 | 30 | -------------------------------------------------------------------------------- /patches/0011-rbernon-patches/0009-wip-clipcursor-v1/0004-winex11.drv-Always-set-the-clipping-window-cursor-wh.patch: -------------------------------------------------------------------------------- 1 | From 5a727263adf56194a24c5abad8350205e81c068b Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Mon, 25 Jan 2021 15:22:08 +0100 4 | Subject: [PATCH 04/13] winex11.drv: Always set the clipping window cursor when 5 | clipping. 6 | 7 | --- 8 | dlls/winex11.drv/window.c | 1 + 9 | 1 file changed, 1 insertion(+) 10 | 11 | diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/winex11.drv/window.c 14 | +++ b/dlls/winex11.drv/window.c 15 | @@ -3263,6 +3263,7 @@ LRESULT X11DRV_WindowMessage( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) 16 | else 17 | sync_window_cursor( win ); 18 | } 19 | + if (clipping_cursor) set_window_cursor( x11drv_thread_data()->clip_window, (HCURSOR)lp ); 20 | return 0; 21 | } 22 | case WM_X11DRV_CLIP_CURSOR_NOTIFY: 23 | -- 24 | 2.40.0 25 | 26 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0444-p0001-kernel32-Enable-LFH-in-HeapCreate.patch: -------------------------------------------------------------------------------- 1 | From 2174473ef4e5ecb59628a6db4e91b23cc9c88180 Mon Sep 17 00:00:00 2001 2 | From: Paul Gofman 3 | Date: Wed, 12 Oct 2022 19:24:45 -0500 4 | Subject: [PATCH 1/3] kernel32: Enable LFH in HeapCreate(). 5 | 6 | CW-Bug-Id: #21364 7 | --- 8 | dlls/kernel32/heap.c | 3 +++ 9 | 1 file changed, 3 insertions(+) 10 | 11 | diff --git a/dlls/kernel32/heap.c b/dlls/kernel32/heap.c 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/kernel32/heap.c 14 | +++ b/dlls/kernel32/heap.c 15 | @@ -59,9 +59,12 @@ HANDLE WINAPI HeapCreate( 16 | SIZE_T maxSize /* [in] Maximum heap size */ 17 | ) { 18 | HANDLE ret; 19 | + ULONG hci = 2; 20 | 21 | ret = RtlCreateHeap( flags, NULL, maxSize, initialSize, NULL, NULL ); 22 | if (!ret) SetLastError( ERROR_NOT_ENOUGH_MEMORY ); 23 | + else if (!(flags & HEAP_CREATE_ENABLE_EXECUTE)) 24 | + HeapSetInformation(ret, HeapCompatibilityInformation, &hci, sizeof(hci)); 25 | return ret; 26 | } 27 | 28 | -------------------------------------------------------------------------------- /patches/0018-gst-decoders/ps0009-p0006-HACK-winegstreamer-Fail-to-plug-elements-whe.patch: -------------------------------------------------------------------------------- 1 | From 80f84017e35a9e99c2b1a3c2767e19d2255164e3 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Tue, 28 Jun 2022 10:05:39 +0200 4 | Subject: [PATCH 6/6] HACK: winegstreamer: Fail to plug elements when parser 5 | has an error. 6 | 7 | CW-Bug-Id: #20819 8 | --- 9 | dlls/winegstreamer/wg_parser.c | 2 ++ 10 | 1 file changed, 2 insertions(+) 11 | 12 | diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c 13 | index 11111111111..11111111111 100644 14 | --- a/dlls/winegstreamer/wg_parser.c 15 | +++ b/dlls/winegstreamer/wg_parser.c 16 | @@ -484,6 +484,8 @@ static GstAutoplugSelectResult autoplug_select_cb(GstElement *bin, GstPad *pad, 17 | 18 | GST_INFO("Using \"%s\".", name); 19 | 20 | + if (parser->error) 21 | + return GST_AUTOPLUG_SELECT_SKIP; 22 | if (strstr(name, "Player protection")) 23 | { 24 | GST_WARNING("Blacklisted a/52 decoder because it only works in Totem."); 25 | -------------------------------------------------------------------------------- /patches/0011-rbernon-patches/0005-wip-focustime-v1/0004-winex11.drv-Reset-XInput2-valuators-only-on-DeviceCh.patch: -------------------------------------------------------------------------------- 1 | From e5a64bf1d7930ecf35e15ad75bf64e0d8905a617 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Sun, 14 Nov 2021 14:38:45 +0100 4 | Subject: [PATCH 4/9] winex11.drv: Reset XInput2 valuators only on DeviceChange 5 | events. 6 | 7 | --- 8 | dlls/winex11.drv/mouse.c | 5 ----- 9 | 1 file changed, 5 deletions(-) 10 | 11 | diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/winex11.drv/mouse.c 14 | +++ b/dlls/winex11.drv/mouse.c 15 | @@ -354,11 +354,6 @@ static void disable_xinput2(void) 16 | mask.deviceid = XIAllMasterDevices; 17 | 18 | pXISelectEvents( data->display, DefaultRootWindow( data->display ), &mask, 1 ); 19 | - 20 | - data->x_valuator.number = -1; 21 | - data->y_valuator.number = -1; 22 | - data->x_valuator.value = 0; 23 | - data->y_valuator.value = 0; 24 | #endif 25 | } 26 | 27 | -- 28 | 2.40.0 29 | 30 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0264-p0002-server-Enable-link-time-optimization.patch: -------------------------------------------------------------------------------- 1 | From 20947fbd978f98d430c2d586806487dc41844051 Mon Sep 17 00:00:00 2001 2 | From: Torge Matthies 3 | Date: Tue, 7 Dec 2021 21:51:07 +0100 4 | Subject: [PATCH 2/3] server: Enable link-time optimization. 5 | 6 | --- 7 | server/Makefile.in | 3 ++- 8 | 1 file changed, 2 insertions(+), 1 deletion(-) 9 | 10 | diff --git a/server/Makefile.in b/server/Makefile.in 11 | index 11111111111..11111111111 100644 12 | --- a/server/Makefile.in 13 | +++ b/server/Makefile.in 14 | @@ -54,6 +54,7 @@ MANPAGES = \ 15 | wineserver.man.in 16 | 17 | UNIX_CFLAGS = $(DBUS_CFLAGS) 18 | -UNIX_LIBS = $(LDEXECFLAGS) $(RT_LIBS) $(INOTIFY_LIBS) $(PROCSTAT_LIBS) $(DBUS_LIBS) 19 | +UNIX_LIBS = $(LDEXECFLAGS) $(RT_LIBS) $(INOTIFY_LIBS) $(PROCSTAT_LIBS) $(DBUS_LIBS) -flto=auto -flto-partition=one -fdevirtualize-at-ltrans 20 | +EXTRADEFS = -flto=auto -flto-partition=one -fdevirtualize-at-ltrans 21 | 22 | unicode_EXTRADEFS = -DNLSDIR="\"${nlsdir}\"" -DBIN_TO_NLSDIR=\"`${MAKEDEP} -R ${bindir} ${nlsdir}`\" 23 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0295-p0007-combase-Don-t-use-attr.ObjectName-after-call.patch: -------------------------------------------------------------------------------- 1 | From: Alex Henrie 2 | Subject: [PATCH 7/9] combase: Don't use attr.ObjectName after calling create_key (cppcheck) 3 | Message-Id: <20211230062119.95326-1-alexhenrie24@gmail.com> 4 | Date: Wed, 29 Dec 2021 23:21:17 -0700 5 | 6 | Signed-off-by: Alex Henrie 7 | --- 8 | dlls/combase/combase.c | 2 +- 9 | 1 file changed, 1 insertion(+), 1 deletion(-) 10 | 11 | diff --git a/dlls/combase/combase.c b/dlls/combase/combase.c 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/combase/combase.c 14 | +++ b/dlls/combase/combase.c 15 | @@ -228,7 +228,7 @@ static HKEY create_classes_root_hkey(DWORD access) 16 | attr.SecurityQualityOfService = NULL; 17 | 18 | if (create_key( &hkey, access, &attr )) return 0; 19 | - TRACE( "%s -> %p\n", debugstr_w(attr.ObjectName->Buffer), hkey ); 20 | + TRACE( "%s -> %p\n", debugstr_w(name.Buffer), hkey ); 21 | 22 | if (!(access & KEY_WOW64_64KEY)) 23 | { 24 | 25 | -- 26 | 2.40.0 27 | 28 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0350-ntdll-Map-ETXTBSY-to-STATUS_SHARING_VIOLATION.patch: -------------------------------------------------------------------------------- 1 | From: Jinoh Kang 2 | Subject: [PATCH] ntdll: Map ETXTBSY to STATUS_SHARING_VIOLATION. 3 | Message-Id: <88fe4a89-c262-bf66-5998-a9a3d0163e60@gmail.com> 4 | Date: Tue, 8 Feb 2022 20:57:44 +0900 5 | 6 | This complements commit c75edd04c2c (server: Map ETXTBSY to 7 | STATUS_SHARING_VIOLATION., 2007-09-11). 8 | 9 | Signed-off-by: Jinoh Kang 10 | --- 11 | dlls/ntdll/unix/file.c | 1 + 12 | 1 file changed, 1 insertion(+) 13 | 14 | diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c 15 | index 11111111111..11111111111 100644 16 | --- a/dlls/ntdll/unix/file.c 17 | +++ b/dlls/ntdll/unix/file.c 18 | @@ -540,6 +540,7 @@ NTSTATUS errno_to_status( int err ) 19 | TRACE( "errno = %d\n", err ); 20 | switch (err) 21 | { 22 | + case ETXTBSY: 23 | case EAGAIN: return STATUS_SHARING_VIOLATION; 24 | case EBADF: return STATUS_INVALID_HANDLE; 25 | case EBUSY: return STATUS_DEVICE_BUSY; 26 | 27 | -- 28 | 2.40.0 29 | 30 | -------------------------------------------------------------------------------- /patches/0010-shared-memory/0023-win32u-Yield-thread-in-peek_message-when-no-message-.patch: -------------------------------------------------------------------------------- 1 | From f8230e1736c8f2b3ae25f2ab71b5bbb8172921ee Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Thu, 29 Apr 2021 20:07:16 +0200 4 | Subject: [PATCH 23/44] win32u: Yield thread in peek_message when no message 5 | was found. 6 | 7 | --- 8 | dlls/win32u/message.c | 1 + 9 | 1 file changed, 1 insertion(+) 10 | 11 | diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/win32u/message.c 14 | +++ b/dlls/win32u/message.c 15 | @@ -1877,6 +1877,7 @@ static int peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags, 16 | thread_info->wake_mask = changed_mask & (QS_SENDMESSAGE | QS_SMRESULT); 17 | thread_info->changed_mask = changed_mask; 18 | if (buffer != buffer_init) free( buffer ); 19 | + NtYieldExecution(); 20 | return 0; 21 | } 22 | if (res != STATUS_BUFFER_OVERFLOW) 23 | 24 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0122-p0005-ntdll-Initialize-USR1-handler-XSTATE-buffer-.patch: -------------------------------------------------------------------------------- 1 | From f82a41c353d85e8a59f55bb1fe6d914e65b552b7 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Sat, 6 Mar 2021 18:12:26 +0100 4 | Subject: [PATCH 5/6] ntdll: Initialize USR1 handler XSTATE buffer (valgrind). 5 | 6 | --- 7 | dlls/ntdll/unix/signal_x86_64.c | 1 + 8 | 1 file changed, 1 insertion(+) 9 | 10 | diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c 11 | index 11111111111..11111111111 100644 12 | --- a/dlls/ntdll/unix/signal_x86_64.c 13 | +++ b/dlls/ntdll/unix/signal_x86_64.c 14 | @@ -2423,6 +2423,7 @@ static void usr1_handler( int signal, siginfo_t *siginfo, void *sigcontext ) 15 | DECLSPEC_ALIGN(64) XSTATE xs; 16 | context.c.ContextFlags = CONTEXT_FULL; 17 | context_init_xstate( &context.c, &xs ); 18 | + memset( &xs, 0, offsetof(XSTATE, YmmContext) ); 19 | 20 | NtGetContextThread( GetCurrentThread(), &context.c ); 21 | wait_suspend( &context.c ); 22 | -- 23 | 2.40.0 24 | 25 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0432-wineboot-Relax-TSC-frequency-calibration-error-to-.patch: -------------------------------------------------------------------------------- 1 | From 8af68e03ee61164e9472ee376d124c6ef03623ec Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Thu, 28 Jul 2022 11:47:03 +0200 4 | Subject: [PATCH] wineboot: Relax TSC frequency calibration error to 500ppm. 5 | 6 | --- 7 | programs/wineboot/wineboot.c | 2 +- 8 | 1 file changed, 1 insertion(+), 1 deletion(-) 9 | 10 | diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c 11 | index 11111111111..11111111111 100644 12 | --- a/programs/wineboot/wineboot.c 13 | +++ b/programs/wineboot/wineboot.c 14 | @@ -321,7 +321,7 @@ static UINT64 read_tsc_frequency( BOOL has_rdtscp ) 15 | freq1 = (tsc3 - tsc1) * 10000000 / (time1 - time0); 16 | error = llabs( (freq1 - freq0) * 1000000 / min( freq1, freq0 ) ); 17 | } 18 | - while (error > 100 && --retries); 19 | + while (error > 500 && --retries); 20 | 21 | if (!retries) WARN( "TSC frequency calibration failed, unstable TSC?\n" ); 22 | else 23 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0056-p0002-widl-open-files-to-write-in-binary-mode.patch: -------------------------------------------------------------------------------- 1 | From: Steve Lhomme 2 | Subject: [PATCH 2/2] widl: open files to write in binary mode 3 | Message-Id: <20201216091429.18075-2-robux4@ycbcr.xyz> 4 | Date: Wed, 16 Dec 2020 10:14:28 +0100 5 | In-Reply-To: <20201216091429.18075-1-robux4@ycbcr.xyz> 6 | References: <20201216091429.18075-1-robux4@ycbcr.xyz> 7 | 8 | When compiled with mingw64 the output files have Windows line endings instead 9 | of UNIX ones. 10 | --- 11 | tools/widl/header.c | 2 +- 12 | 1 file changed, 1 insertion(+), 1 deletion(-) 13 | 14 | diff --git a/tools/widl/header.c b/tools/widl/header.c 15 | index 11111111111..11111111111 100644 16 | --- a/tools/widl/header.c 17 | +++ b/tools/widl/header.c 18 | @@ -2074,7 +2074,7 @@ void write_header(const statement_list_t *stmts) 19 | 20 | if (!do_header) return; 21 | 22 | - if(!(header = fopen(header_name, "w"))) { 23 | + if(!(header = fopen(header_name, "wb"))) { 24 | error("Could not open %s for output\n", header_name); 25 | return; 26 | } 27 | 28 | -- 29 | 2.40.0 30 | 31 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0275-p0006-ntdll-Remove-extra-call-to-getenv-from-virtu.patch: -------------------------------------------------------------------------------- 1 | From: Alex Henrie 2 | Subject: [PATCH 6/7] ntdll: Remove extra call to getenv from virtual_init (scan-build) 3 | Message-Id: <20211221050337.105216-1-alexhenrie24@gmail.com> 4 | Date: Mon, 20 Dec 2021 22:03:37 -0700 5 | 6 | Signed-off-by: Alex Henrie 7 | --- 8 | dlls/ntdll/unix/virtual.c | 2 +- 9 | 1 file changed, 1 insertion(+), 1 deletion(-) 10 | 11 | diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/ntdll/unix/virtual.c 14 | +++ b/dlls/ntdll/unix/virtual.c 15 | @@ -2874,7 +2874,7 @@ static int alloc_virtual_heap( void *base, SIZE_T size, void *arg ) 16 | void virtual_init(void) 17 | { 18 | const struct preload_info **preload_info = dlsym( RTLD_DEFAULT, "wine_main_preload_info" ); 19 | - const char *preload = getenv( "WINEPRELOADRESERVE" ); 20 | + const char *preload; 21 | struct alloc_virtual_heap alloc_views; 22 | size_t size; 23 | int i; 24 | 25 | -- 26 | 2.40.0 27 | 28 | -------------------------------------------------------------------------------- /user.cfg: -------------------------------------------------------------------------------- 1 | #!/hint/bash 2 | 3 | ### Config entry point ### 4 | 5 | resolve_link() ( 6 | dest="$(readlink -- "$1" && echo x)" || return 7 | dest="${dest%?x}" 8 | link_dir="$(dirname -- "$1" && echo x)" 9 | link_dir="${link_dir%?x}" 10 | dest_dir="$(dirname -- "${dest}" && echo x)" 11 | dest_dir="${dest_dir%?x}" 12 | dest_name="$(basename -- "${dest}" && echo x)" 13 | dest_name="${dest_name%?x}" 14 | abs_dest_dir="$(CDPATH='' cd -- "${link_dir}" && CDPATH='' cd -- "${dest_dir}" && pwd -P && echo x)" 15 | abs_dest_dir="${abs_dest_dir%?x}" 16 | exec printf '%s' "${abs_dest_dir}/${dest_name}" 17 | ) 18 | find_basedir() { 19 | local file="${BASH_SOURCE[1]}" basedir='' 20 | while basedir="$(dirname -- "${file}" && echo x)" && \ 21 | basedir="${basedir%?x}" && \ 22 | ! [ -e "${basedir}"/config/wine-tkg.cfg ]; do 23 | file="$(resolve_link "${file}" && echo x)" || break 24 | file="${file%?x}" 25 | done 26 | [ -e "${basedir}/config/wine-tkg.cfg" ] && printf '%s' "${basedir}" 27 | } 28 | . "$(find_basedir)"/config/wine-tkg.cfg 29 | -------------------------------------------------------------------------------- /patches/0001-qpc-opt/0004-ntdll-Prefer-RtlQueryPerformanceCounter-over-NtQuery.patch: -------------------------------------------------------------------------------- 1 | From e7e1b259412189a56ef6a6962f42807a26e1aab8 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Thu, 4 Mar 2021 10:50:48 +0100 4 | Subject: [PATCH 4/9] ntdll: Prefer RtlQueryPerformanceCounter over 5 | NtQueryPerformanceCounter. 6 | 7 | --- 8 | dlls/ntdll/threadpool.c | 6 ++++-- 9 | 1 file changed, 4 insertions(+), 2 deletions(-) 10 | 11 | diff --git a/dlls/ntdll/threadpool.c b/dlls/ntdll/threadpool.c 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/ntdll/threadpool.c 14 | +++ b/dlls/ntdll/threadpool.c 15 | @@ -600,8 +600,10 @@ static DWORD WINAPI timer_callback_wrapper(LPVOID p) 16 | 17 | static inline ULONGLONG queue_current_time(void) 18 | { 19 | - LARGE_INTEGER now, freq; 20 | - NtQueryPerformanceCounter(&now, &freq); 21 | + static LARGE_INTEGER freq; 22 | + LARGE_INTEGER now; 23 | + if (!freq.QuadPart) RtlQueryPerformanceFrequency(&freq); 24 | + RtlQueryPerformanceCounter(&now); 25 | return now.QuadPart * 1000 / freq.QuadPart; 26 | } 27 | 28 | -------------------------------------------------------------------------------- /patches/0011-rbernon-patches/0012-wip-user32-tests/0010-user32-tests-Add-broken-w1064v1809-mouse-input-test-.patch: -------------------------------------------------------------------------------- 1 | From 28027dafc55eb1abeabba070c00a7dc91b1fdec9 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Thu, 23 Jan 2020 14:19:27 +0100 4 | Subject: [PATCH 10/16] user32/tests: Add broken w1064v1809 mouse input test 5 | result. 6 | 7 | --- 8 | dlls/user32/tests/win.c | 2 ++ 9 | 1 file changed, 2 insertions(+) 10 | 11 | diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/user32/tests/win.c 14 | +++ b/dlls/user32/tests/win.c 15 | @@ -4665,6 +4665,8 @@ static void test_mouse_input(void) 16 | msg.hwnd, popup, msg.message); 17 | 18 | ret = wait_for_message( &msg ); 19 | + if (broken(msg.message >= WM_USER) /* on w1064v1809 */) 20 | + ret = wait_for_message( &msg ); 21 | ok(ret, "no message available\n"); 22 | ok(msg.hwnd == popup && msg.message == WM_LBUTTONUP, "hwnd %p/%p message %04x\n", 23 | msg.hwnd, popup, msg.message); 24 | -- 25 | 2.40.0 26 | 27 | -------------------------------------------------------------------------------- /patches/0010-shared-memory/0002-server-Use-the-helper-to-update-the-cursor-last-chan.patch: -------------------------------------------------------------------------------- 1 | From 190c4318f084935ec756d0e9f545e70878ea4127 Mon Sep 17 00:00:00 2001 2 | From: Huw Davies 3 | Date: Mon, 29 Jun 2020 11:12:12 +0100 4 | Subject: [PATCH 02/44] server: Use the helper to update the cursor last change 5 | time. 6 | 7 | Signed-off-by: Huw Davies 8 | --- 9 | server/queue.c | 2 +- 10 | 1 file changed, 1 insertion(+), 1 deletion(-) 11 | 12 | diff --git a/server/queue.c b/server/queue.c 13 | index 11111111111..11111111111 100644 14 | --- a/server/queue.c 15 | +++ b/server/queue.c 16 | @@ -1874,7 +1874,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons 17 | WM_MOUSEHWHEEL /* 0x1000 = MOUSEEVENTF_HWHEEL */ 18 | }; 19 | 20 | - desktop->cursor.last_change = get_tick_count(); 21 | + update_desktop_cursor_pos( desktop, desktop->cursor.x, desktop->cursor.y ); /* Update last change time */ 22 | flags = input->mouse.flags; 23 | time = input->mouse.time; 24 | if (!time) time = desktop->cursor.last_change; 25 | 26 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0177-p0007-ntdll-Do-not-lock-loader-in-RtlPcToFileHeade.patch: -------------------------------------------------------------------------------- 1 | From: Paul Gofman 2 | Subject: [PATCH v2 7/7] ntdll: Do not lock loader in RtlPcToFileHeader(). 3 | Message-Id: <20211001220041.349604-7-pgofman@codeweavers.com> 4 | Date: Sat, 2 Oct 2021 01:00:41 +0300 5 | In-Reply-To: <20211001220041.349604-1-pgofman@codeweavers.com> 6 | References: <20211001220041.349604-1-pgofman@codeweavers.com> 7 | 8 | Signed-off-by: Paul Gofman 9 | --- 10 | dlls/ntdll/loader.c | 2 -- 11 | 1 file changed, 2 deletions(-) 12 | 13 | diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c 14 | index 11111111111..11111111111 100644 15 | --- a/dlls/ntdll/loader.c 16 | +++ b/dlls/ntdll/loader.c 17 | @@ -4721,9 +4721,7 @@ PVOID WINAPI RtlPcToFileHeader( PVOID pc, PVOID *address ) 18 | LDR_DATA_TABLE_ENTRY *module; 19 | PVOID ret = NULL; 20 | 21 | - lock_loader_exclusive(); 22 | if (!LdrFindEntryForAddress( pc, &module )) ret = module->DllBase; 23 | - unlock_loader(); 24 | *address = ret; 25 | return ret; 26 | } 27 | 28 | -- 29 | 2.40.0 30 | 31 | -------------------------------------------------------------------------------- /patches/0017-networking-and-browser/ps0037-iphlpapi-Return-ERROR_NO_DATA-from-GetIpNetTable-i.patch: -------------------------------------------------------------------------------- 1 | From b0a91fb9dd31fc9792e150dfd284515543c826cf Mon Sep 17 00:00:00 2001 2 | From: Paul Gofman 3 | Date: Fri, 10 Jun 2022 20:32:19 -0500 4 | Subject: [PATCH] iphlpapi: Return ERROR_NO_DATA from GetIpNetTable() if no 5 | entries are found. 6 | 7 | CW-Bug-Id: #20794 8 | --- 9 | dlls/iphlpapi/iphlpapi_main.c | 7 +++++++ 10 | 1 file changed, 7 insertions(+) 11 | 12 | diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c 13 | index 11111111111..11111111111 100644 14 | --- a/dlls/iphlpapi/iphlpapi_main.c 15 | +++ b/dlls/iphlpapi/iphlpapi_main.c 16 | @@ -2321,6 +2321,13 @@ DWORD WINAPI GetIpNetTable( MIB_IPNETTABLE *table, ULONG *size, BOOL sort ) 17 | NULL, 0, &count, 0 ); 18 | if (err) return err; 19 | 20 | + if (!count) 21 | + { 22 | + *size = 0; 23 | + err = ERROR_NO_DATA; 24 | + goto err; 25 | + } 26 | + 27 | needed = FIELD_OFFSET( MIB_IPNETTABLE, table[count] ); 28 | 29 | if (!table || *size < needed) 30 | -------------------------------------------------------------------------------- /patches/9999-diffs/fix-duplicate-kbmsg.patch: -------------------------------------------------------------------------------- 1 | https://bugs.winehq.org/show_bug.cgi?id=50067 2 | 3 | diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c 4 | index 11111111111..11111111111 100644 5 | --- a/dlls/win32u/message.c 6 | +++ b/dlls/win32u/message.c 7 | @@ -1522,6 +1522,7 @@ static BOOL process_keyboard_message( MSG *msg, UINT hw_id, HWND hwnd_filter, 8 | 9 | if (remove) 10 | { 11 | + accept_hardware_message( hw_id ); 12 | if((msg->message == WM_KEYDOWN) && 13 | (msg->hwnd != get_desktop_window())) 14 | { 15 | @@ -1551,10 +1552,9 @@ static BOOL process_keyboard_message( MSG *msg, UINT hw_id, HWND hwnd_filter, 16 | { 17 | /* skip this message */ 18 | call_hooks( WH_CBT, HCBT_KEYSKIPPED, LOWORD(msg->wParam), msg->lParam, 0 ); 19 | - accept_hardware_message( hw_id ); 20 | + if (!remove) accept_hardware_message( hw_id ); 21 | return FALSE; 22 | } 23 | - if (remove) accept_hardware_message( hw_id ); 24 | msg->pt = point_phys_to_win_dpi( msg->hwnd, msg->pt ); 25 | 26 | if (remove && msg->message == WM_KEYDOWN) 27 | -------------------------------------------------------------------------------- /patches/0012-window-input-and-control-handling/ps0077-winex11.drv-Fix-import-XA_STRING-compatible-wide-c.patch: -------------------------------------------------------------------------------- 1 | From: Chao Long 2 | Subject: [PATCH] winex11.drv: Fix import XA_STRING compatible wide character. 3 | Message-Id: <20211217091744.11043-1-longchao@uniontech.com> 4 | Date: Fri, 17 Dec 2021 17:17:44 +0800 5 | 6 | Signed-off-by: Chao Long 7 | --- 8 | dlls/winex11.drv/clipboard.c | 2 +- 9 | 1 file changed, 1 insertion(+), 1 deletion(-) 10 | 11 | diff --git a/dlls/winex11.drv/clipboard.c b/dlls/winex11.drv/clipboard.c 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/winex11.drv/clipboard.c 14 | +++ b/dlls/winex11.drv/clipboard.c 15 | @@ -682,7 +682,7 @@ static CPTABLEINFO *get_xstring_cp(void) 16 | { 17 | USHORT *ptr; 18 | SIZE_T nls_size; 19 | - if (NtGetNlsSectionPtr( 11, 28591, NULL, (void **)&ptr, &nls_size )) return NULL; 20 | + if (NtGetNlsSectionPtr( 11, CP_UTF8, NULL, (void **)&ptr, &nls_size )) return NULL; 21 | RtlInitCodePageTable( ptr, &cp ); 22 | } 23 | return &cp; 24 | 25 | -- 26 | 2.40.0 27 | 28 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0051-winevulkan-Don-t-support-VK_EXT_headless_surface.patch: -------------------------------------------------------------------------------- 1 | From: Georg Lehmann 2 | Subject: [PATCH] winevulkan: Don't support VK_EXT_headless_surface. 3 | Message-Id: <20201119115652.7225-1-dadschoorse@gmail.com> 4 | Date: Thu, 19 Nov 2020 12:56:52 +0100 5 | 6 | It's completly broken because the wine drivers only implement 7 | VK_KHR_win32_surface. 8 | 9 | Signed-off-by: Georg Lehmann 10 | --- 11 | dlls/winevulkan/make_vulkan | 1 + 12 | 1 file changed, 1 insertion(+) 13 | 14 | diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan 15 | index 11111111111..11111111111 100755 16 | --- a/dlls/winevulkan/make_vulkan 17 | +++ b/dlls/winevulkan/make_vulkan 18 | @@ -92,6 +92,7 @@ UNSUPPORTED_EXTENSIONS = [ 19 | "VK_EXT_headless_surface", # Needs WSI work. 20 | "VK_KHR_display", # Needs WSI work. 21 | "VK_KHR_surface_protected_capabilities", 22 | + "VK_EXT_headless_surface", # Needs WSI work. 23 | "VK_LUNARG_direct_driver_loading", # Implemented in the Vulkan loader 24 | 25 | # Device extensions 26 | 27 | -- 28 | 2.40.0 29 | 30 | -------------------------------------------------------------------------------- /patches/0001-qpc-opt/0006-kernelbase-Prefer-RtlQueryPerformanceCounter-over-Nt.patch: -------------------------------------------------------------------------------- 1 | From 8646f9ee9452b2adaedda179c8704dbc5544441e Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Thu, 4 Mar 2021 10:51:17 +0100 4 | Subject: [PATCH 6/9] kernelbase: Prefer RtlQueryPerformanceCounter over 5 | NtQueryPerformanceCounter. 6 | 7 | --- 8 | dlls/kernelbase/registry.c | 3 ++- 9 | 1 file changed, 2 insertions(+), 1 deletion(-) 10 | 11 | diff --git a/dlls/kernelbase/registry.c b/dlls/kernelbase/registry.c 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/kernelbase/registry.c 14 | +++ b/dlls/kernelbase/registry.c 15 | @@ -1564,7 +1564,8 @@ static DWORD query_perf_data( const WCHAR *query, DWORD *type, void *data, DWORD 16 | pdb->HeaderLength = sizeof(*pdb); 17 | pdb->NumObjectTypes = 0; 18 | pdb->DefaultObject = 0; 19 | - NtQueryPerformanceCounter( &pdb->PerfTime, &pdb->PerfFreq ); 20 | + RtlQueryPerformanceFrequency( &pdb->PerfFreq ); 21 | + RtlQueryPerformanceCounter( &pdb->PerfTime ); 22 | 23 | data = pdb + 1; 24 | pdb->SystemNameOffset = sizeof(*pdb); 25 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0475-ntdll-Exclude-more-environment-variables-from-Window.patch: -------------------------------------------------------------------------------- 1 | From 68604557a54ba43f31a63022e80f70095ada4696 Mon Sep 17 00:00:00 2001 2 | From: Torge Matthies 3 | Date: Tue, 4 Apr 2023 01:15:52 +0200 4 | Subject: [PATCH] ntdll: Exclude more environment variables from Windows 5 | environment. 6 | 7 | Signed-off-by: Torge Matthies 8 | --- 9 | dlls/ntdll/unix/env.c | 3 +++ 10 | 1 file changed, 3 insertions(+) 11 | 12 | diff --git a/dlls/ntdll/unix/env.c b/dlls/ntdll/unix/env.c 13 | index 11111111111..11111111111 100644 14 | --- a/dlls/ntdll/unix/env.c 15 | +++ b/dlls/ntdll/unix/env.c 16 | @@ -342,6 +342,9 @@ static BOOL is_special_env_var( const char *var ) 17 | STARTS_WITH( var, "HOME=" ) || 18 | STARTS_WITH( var, "TEMP=" ) || 19 | STARTS_WITH( var, "TMP=" ) || 20 | + STARTS_WITH( var, "TZ=" ) || 21 | + STARTS_WITH( var, "LANG=" ) || 22 | + STARTS_WITH( var, "LC_" ) || 23 | STARTS_WITH( var, "QT_" ) || 24 | STARTS_WITH( var, "VK_" )); 25 | } 26 | -- 27 | 2.40.0 28 | 29 | -------------------------------------------------------------------------------- /patches/0012-window-input-and-control-handling/ps0066-win32u-Fix-event-queue-congestion-can-cause-WINPOS.patch: -------------------------------------------------------------------------------- 1 | From: Chao Long 2 | Subject: [PATCH] win32u: Fix event queue congestion can cause WINPOS_WindowFromPoint is null. 3 | Message-Id: <20211021033122.18818-1-longchao@uniontech.com> 4 | Date: Thu, 21 Oct 2021 11:31:22 +0800 5 | 6 | Signed-off-by: Chao Long 7 | --- 8 | dlls/win32u/input.c | 2 +- 9 | 1 file changed, 1 insertion(+), 1 deletion(-) 10 | 11 | diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/win32u/input.c 14 | +++ b/dlls/win32u/input.c 15 | @@ -1684,7 +1684,7 @@ BOOL WINAPI NtUserTrackMouseEvent( TRACKMOUSEEVENT *info ) 16 | tracking_info.info.dwFlags = 0; 17 | tracking_info.info.dwHoverTime = 0; 18 | 19 | - if (info->hwndTrack == hwnd) 20 | + if (info->hwndTrack == hwnd || (info->dwFlags & TME_LEAVE && hittest==HTNOWHERE)) 21 | { 22 | /* Adding new mouse event to the tracking list */ 23 | tracking_info.info = *info; 24 | 25 | -- 26 | 2.40.0 27 | 28 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0444-p0003-kernelbase-Enable-LFH-in-HeapCreate.patch: -------------------------------------------------------------------------------- 1 | From f6eea7e9ac01a115b9ce0531e020a510c904c093 Mon Sep 17 00:00:00 2001 2 | From: Paul Gofman 3 | Date: Thu, 13 Oct 2022 09:27:10 -0500 4 | Subject: [PATCH 3/3] kernelbase: Enable LFH in HeapCreate(). 5 | 6 | CW-Bug-Id: #21364 7 | --- 8 | dlls/kernelbase/memory.c | 4 ++++ 9 | 1 file changed, 4 insertions(+) 10 | 11 | diff --git a/dlls/kernelbase/memory.c b/dlls/kernelbase/memory.c 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/kernelbase/memory.c 14 | +++ b/dlls/kernelbase/memory.c 15 | @@ -599,7 +599,11 @@ SIZE_T WINAPI DECLSPEC_HOTPATCH HeapCompact( HANDLE heap, DWORD flags ) 16 | HANDLE WINAPI DECLSPEC_HOTPATCH HeapCreate( DWORD flags, SIZE_T init_size, SIZE_T max_size ) 17 | { 18 | HANDLE ret = RtlCreateHeap( flags, NULL, max_size, init_size, NULL, NULL ); 19 | + ULONG hci = 2; 20 | + 21 | if (!ret) SetLastError( ERROR_NOT_ENOUGH_MEMORY ); 22 | + else if (!(flags & HEAP_CREATE_ENABLE_EXECUTE)) 23 | + HeapSetInformation( ret, HeapCompatibilityInformation, &hci, sizeof(hci) ); 24 | return ret; 25 | } 26 | 27 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0445-p0011-include-Add-a-comment-explaining-why-all-ker.patch: -------------------------------------------------------------------------------- 1 | From fbbbf4462056ebf17515d65d4e2cd4a34dc0dfc3 Mon Sep 17 00:00:00 2001 2 | From: Torge Matthies 3 | Date: Tue, 22 Nov 2022 18:18:21 +0100 4 | Subject: [PATCH 11/11] include: Add a comment explaining why all kernel 5 | callbacks must be in user32. 6 | 7 | Signed-off-by: Torge Matthies 8 | --- 9 | include/ntuser.h | 5 ++++- 10 | 1 file changed, 4 insertions(+), 1 deletion(-) 11 | 12 | diff --git a/include/ntuser.h b/include/ntuser.h 13 | index 11111111111..11111111111 100644 14 | --- a/include/ntuser.h 15 | +++ b/include/ntuser.h 16 | @@ -24,7 +24,10 @@ 17 | #include 18 | #include 19 | 20 | -/* KernelCallbackTable codes, not compatible with Windows */ 21 | +/* KernelCallbackTable codes, not compatible with Windows. 22 | + All of these functions must live inside user32.dll. Overwatch 2's 23 | + KiUserCallbackDispatcher hook verifies this and prevents the callback from 24 | + running if that check fails. */ 25 | enum 26 | { 27 | /* user32 callbacks */ 28 | -- 29 | 2.40.0 30 | 31 | -------------------------------------------------------------------------------- /patches/0012-window-input-and-control-handling/ps0020-winex11.drv-Only-send-state-changes-for-updated-wm.patch: -------------------------------------------------------------------------------- 1 | From 5635f5f254292efaec0bf842018c1b7859a400a0 Mon Sep 17 00:00:00 2001 2 | From: Torge Matthies 3 | Date: Tue, 26 Apr 2022 03:58:10 +0200 4 | Subject: [PATCH] winex11.drv: Only send state changes for updated wm states. 5 | 6 | --- 7 | dlls/winex11.drv/window.c | 3 +++ 8 | 1 file changed, 3 insertions(+) 9 | 10 | diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c 11 | index 11111111111..11111111111 100644 12 | --- a/dlls/winex11.drv/window.c 13 | +++ b/dlls/winex11.drv/window.c 14 | @@ -1120,6 +1120,9 @@ void update_net_wm_states( struct x11drv_win_data *data ) 15 | 16 | for (i = 0; i < NB_NET_WM_STATES; i++) 17 | { 18 | + if (!((new_state ^ data->net_wm_state) & (1 << i))) 19 | + continue; 20 | + 21 | TRACE( "setting wm state %u for window %p/%lx to %u prev %u\n", 22 | i, data->hwnd, data->whole_window, 23 | (new_state & (1 << i)) != 0, (data->net_wm_state & (1 << i)) != 0 ); 24 | -- 25 | 2.40.0 26 | 27 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0410-p0004-win32u-Set-the-default-gamma-value-to-1400.patch: -------------------------------------------------------------------------------- 1 | From: Byeongsik Jeon 2 | Subject: [PATCH v2 4/5] win32u: Set the default gamma value to 1400. 3 | Message-Id: <20220421184922.394344-5-bsjeon@hanmail.net> 4 | Date: Fri, 22 Apr 2022 03:49:21 +0900 5 | In-Reply-To: <20220421184922.394344-1-bsjeon@hanmail.net> 6 | References: <20220421184922.394344-1-bsjeon@hanmail.net> 7 | 8 | Signed-off-by: Byeongsik Jeon 9 | --- 10 | v2: no change. 11 | 12 | dlls/win32u/font.c | 2 +- 13 | 1 file changed, 1 insertion(+), 1 deletion(-) 14 | 15 | diff --git a/dlls/win32u/font.c b/dlls/win32u/font.c 16 | index 11111111111..11111111111 100644 17 | --- a/dlls/win32u/font.c 18 | +++ b/dlls/win32u/font.c 19 | @@ -4887,7 +4887,7 @@ UINT init_font_options(void) 20 | char value_buffer[FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data[20 * sizeof(WCHAR)])]; 21 | KEY_VALUE_PARTIAL_INFORMATION *info = (void *)value_buffer; 22 | HKEY key; 23 | - DWORD i, val, gamma = 1000; 24 | + DWORD i, val, gamma = 1400; 25 | UINT dpi = 0; 26 | 27 | 28 | init_reg_keys(); 29 | -- 30 | 2.40.0 31 | 32 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0281-p0001-configure.ac-Add-fasynchronous-unwind-tables.patch: -------------------------------------------------------------------------------- 1 | From bd9eeb0897b05f44cf9a9b51cde9d553033658ea Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Tue, 28 Sep 2021 10:49:53 +0200 4 | Subject: [PATCH 1/4] configure.ac: Add -fasynchronous-unwind-tables to 5 | CROSSLDFLAGS. 6 | 7 | When available. Otherwise the output_cfi calls in winebuild, in the 8 | syscall thunks for instance, are just no-op. 9 | --- 10 | configure.ac | 1 + 11 | 1 file changed, 1 insertion(+) 12 | 13 | diff --git a/configure.ac b/configure.ac 14 | index 11111111111..11111111111 100644 15 | --- a/configure.ac 16 | +++ b/configure.ac 17 | @@ -2017,6 +2017,7 @@ then 18 | DLLFLAGS="$DLLFLAGS -fasynchronous-unwind-tables" 19 | LDDLLFLAGS="$LDDLLFLAGS -fasynchronous-unwind-tables" 20 | UNIXDLLFLAGS="$UNIXDLLFLAGS -fasynchronous-unwind-tables" 21 | + CROSSLDFLAGS="$CROSSLDFLAGS -fasynchronous-unwind-tables" 22 | elif test $HOST_ARCH = x86_64 23 | then 24 | WINE_WARNING([building 64-bit Wine without support for CFI directives; exception handling will not work properly.]) 25 | -- 26 | 2.40.0 27 | 28 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0322-p0012-loader-Enable-dumping-additional-vectors-in-.patch: -------------------------------------------------------------------------------- 1 | From: Jinoh Kang 2 | Subject: [PATCH v3 12/13] loader: Enable dumping additional vectors in dump_auxiliary. 3 | Message-Id: <6ec8f3d1-f7b6-fe99-0fb4-44fd5bab2d08@gmail.com> 4 | Date: Wed, 26 Jan 2022 00:25:51 +0900 5 | In-Reply-To: 6 | References: 7 | 8 | Signed-off-by: Jinoh Kang 9 | --- 10 | loader/preloader.c | 5 +++++ 11 | 1 file changed, 5 insertions(+) 12 | 13 | diff --git a/loader/preloader.c b/loader/preloader.c 14 | index 11111111111..11111111111 100644 15 | --- a/loader/preloader.c 16 | +++ b/loader/preloader.c 17 | @@ -1164,6 +1164,11 @@ static void dump_auxiliary( struct wld_auxv *av ) 18 | NAME(AT_SYSINFO), 19 | NAME(AT_SYSINFO_EHDR), 20 | NAME(AT_UID), 21 | + NAME(AT_SECURE), 22 | + NAME(AT_RANDOM), 23 | + NAME(AT_HWCAP2), 24 | + NAME(AT_EXECFN), 25 | + NAME(AT_MINSIGSTKSZ), 26 | { 0, NULL } 27 | }; 28 | #undef NAME 29 | 30 | -- 31 | 2.40.0 32 | 33 | -------------------------------------------------------------------------------- /patches/0011-rbernon-patches/0002-wip-vulkan-child-v1/0014-winex11.drv-Don-t-consider-swapchain-less-Vulkan-sur.patch: -------------------------------------------------------------------------------- 1 | From b685e0dd3e969095b4d6f2e29aec8e74c7a2c87f Mon Sep 17 00:00:00 2001 2 | From: Arkadiusz Hiler 3 | Date: Tue, 23 Nov 2021 13:54:34 +0200 4 | Subject: [PATCH 14/14] winex11.drv: Don't consider swapchain-less Vulkan 5 | surfaces active. 6 | 7 | --- 8 | dlls/winex11.drv/vulkan.c | 3 ++- 9 | 1 file changed, 2 insertions(+), 1 deletion(-) 10 | 11 | diff --git a/dlls/winex11.drv/vulkan.c b/dlls/winex11.drv/vulkan.c 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/winex11.drv/vulkan.c 14 | +++ b/dlls/winex11.drv/vulkan.c 15 | @@ -341,8 +341,9 @@ Window wine_vk_active_surface(HWND hwnd) 16 | LIST_FOR_EACH_ENTRY(surface, &surface_list, struct wine_vk_surface, entry) 17 | { 18 | if (surface->hwnd != hwnd) continue; 19 | - if (surface->swapchain_count) surface_with_swapchain_count++; 20 | + if (!surface->swapchain_count) continue; 21 | active = surface; 22 | + surface_with_swapchain_count++; 23 | } 24 | if (!active) window = None; 25 | else 26 | -- 27 | 2.40.0 28 | 29 | -------------------------------------------------------------------------------- /patches/0011-rbernon-patches/0003-wip-setactivewindow-v1/0009-Revert-fixup-user32-tests-Test-a-recursive-activatio.patch: -------------------------------------------------------------------------------- 1 | From 8cca7af7e5547f386bd8adfdc46ac1ddf091b10e Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Fri, 25 Mar 2022 00:10:04 +0100 4 | Subject: [PATCH 09/16] Revert "fixup! user32/tests: Test a recursive 5 | activation loop on WM_ACTIVATE." 6 | 7 | This reverts commit f3ea0ccdb44906b9c2570aae00d8449d4d4eac80. 8 | --- 9 | dlls/user32/tests/msg.c | 2 +- 10 | 1 file changed, 1 insertion(+), 1 deletion(-) 11 | 12 | diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c 13 | index 11111111111..11111111111 100644 14 | --- a/dlls/user32/tests/msg.c 15 | +++ b/dlls/user32/tests/msg.c 16 | @@ -10796,7 +10796,7 @@ static LRESULT WINAPI ShowWindowProcA(HWND hwnd, UINT message, WPARAM wParam, LP 17 | static LRESULT WINAPI recursive_activation_wndprocA(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) 18 | { 19 | static LONG defwndproc_counter = 0; 20 | - struct recvd_message msg; 21 | + struct message msg; 22 | LRESULT ret; 23 | 24 | switch (message) 25 | -- 26 | 2.40.0 27 | 28 | -------------------------------------------------------------------------------- /patches/0012-window-input-and-control-handling/ps0041-winex11.drv-Flush-X-connection-after-ungrabbing-th.patch: -------------------------------------------------------------------------------- 1 | From 10df80804000aa66c7ef92f1361759e309f0e321 Mon Sep 17 00:00:00 2001 2 | From: Giovanni Mascellani 3 | Date: Mon, 15 Mar 2021 12:01:25 -0500 4 | Subject: [PATCH] winex11.drv: Flush X connection after ungrabbing the pointer 5 | 6 | --- 7 | dlls/winex11.drv/mouse.c | 6 +++++- 8 | 1 file changed, 5 insertions(+), 1 deletion(-) 9 | 10 | diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c 11 | index 11111111111..11111111111 100644 12 | --- a/dlls/winex11.drv/mouse.c 13 | +++ b/dlls/winex11.drv/mouse.c 14 | @@ -515,7 +515,11 @@ void ungrab_clipping_window(void) 15 | TRACE( "no longer clipping\n" ); 16 | if (clip_window_mapped) XUnmapWindow( data->display, clip_window ); 17 | clip_window_mapped = FALSE; 18 | - if (clipping_cursor) XUngrabPointer( data->display, CurrentTime ); 19 | + if (clipping_cursor) 20 | + { 21 | + XUngrabPointer( data->display, CurrentTime ); 22 | + XFlush( data->display ); 23 | + } 24 | clipping_cursor = FALSE; 25 | data->clip_reset = NtGetTickCount(); 26 | } 27 | -------------------------------------------------------------------------------- /patches/9999-diffs/enable-dynamic-spinning.patch: -------------------------------------------------------------------------------- 1 | diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c 2 | index 11111111111..11111111111 100644 3 | --- a/dlls/ntdll/sync.c 4 | +++ b/dlls/ntdll/sync.c 5 | @@ -47,6 +47,7 @@ static const char *debugstr_timeout( const LARGE_INTEGER *timeout ) 6 | } 7 | 8 | #define MAX_ADAPTIVE_SPIN_COUNT 4000 9 | +#define DEFAULT_ADAPTIVE_SPIN_COUNT 2000 10 | #define MIN(a, b) (((a) < (b)) ? (a) : (b)) 11 | 12 | /****************************************************************** 13 | @@ -230,6 +231,12 @@ NTSTATUS WINAPI RtlInitializeCriticalSectionEx( RTL_CRITICAL_SECTION *crit, ULON 14 | if (flags & RTL_CRITICAL_SECTION_FLAG_STATIC_INIT) 15 | FIXME("(%p,%lu,0x%08lx) semi-stub\n", crit, spincount, flags); 16 | 17 | + if (!spincount) 18 | + { 19 | + flags |= RTL_CRITICAL_SECTION_FLAG_DYNAMIC_SPIN; 20 | + spincount = DEFAULT_ADAPTIVE_SPIN_COUNT; 21 | + } 22 | + 23 | /* FIXME: if RTL_CRITICAL_SECTION_FLAG_STATIC_INIT is given, we should use 24 | * memory from a static pool to hold the debug info. Then heap.c could pass 25 | * this flag rather than initialising the process heap CS by hand. If this 26 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0030-p0003-wineboot-Check-GetTokenInformation-return-va.patch: -------------------------------------------------------------------------------- 1 | From: Serge Gautherie 2 | Subject: [PATCH 3/4] wineboot: Check GetTokenInformation() return value. 3 | Message-Id: <20200719081900.6592-1-winehq-git_serge_180711@gautherie.fr> 4 | Date: Sun, 19 Jul 2020 10:19:00 +0200 5 | 6 | Signed-off-by: Serge Gautherie 7 | --- 8 | programs/wineboot/wineboot.c | 7 ++++++- 9 | 1 file changed, 6 insertions(+), 1 deletion(-) 10 | 11 | diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c 12 | index 11111111111..11111111111 100644 13 | --- a/programs/wineboot/wineboot.c 14 | +++ b/programs/wineboot/wineboot.c 15 | @@ -1796,7 +1796,12 @@ static void update_user_profile(void) 16 | return; 17 | 18 | size = sizeof(token_buf); 19 | - GetTokenInformation(token, TokenUser, token_buf, size, &size); 20 | + if (!GetTokenInformation(token, TokenUser, token_buf, size, &size)) 21 | + { 22 | + CloseHandle(token); 23 | + return; 24 | + } 25 | + 26 | CloseHandle(token); 27 | 28 | ConvertSidToStringSidW(((TOKEN_USER *)token_buf)->User.Sid, &sid); 29 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0244-p0002-WIP-ntdll-Lookup-short-file-name-extension-f.patch: -------------------------------------------------------------------------------- 1 | From 4054919d99b37edb6691484703562e65cb99f978 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Sat, 20 Nov 2021 19:14:04 +0100 4 | Subject: [PATCH 2/4] WIP: ntdll: Lookup short file name extension from the 5 | end. 6 | 7 | --- 8 | dlls/ntdll/unix/file.c | 4 +++- 9 | 1 file changed, 3 insertions(+), 1 deletion(-) 10 | 11 | diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/ntdll/unix/file.c 14 | +++ b/dlls/ntdll/unix/file.c 15 | @@ -1546,7 +1546,9 @@ static ULONG hash_short_file_name( const WCHAR *name, int length, LPWSTR buffer 16 | } 17 | 18 | /* Find last dot for start of the extension */ 19 | - for (p = name + 1, ext = NULL; p < end - 1; p++) if (*p == '.') ext = p; 20 | + for (end = name + length, ext = end - 1; ext > name; ext--) 21 | + if (*ext == '.') break; 22 | + if (ext == name) ext = NULL; 23 | 24 | /* Copy first 4 chars, replacing invalid chars with '_' */ 25 | for (i = 4, p = name, dst = buffer; i > 0; i--, p++) 26 | -- 27 | 2.40.0 28 | 29 | -------------------------------------------------------------------------------- /patches/0011-rbernon-patches/0009-wip-clipcursor-v1/0003-server-Notify-desktop-of-cursor-window-changes.patch: -------------------------------------------------------------------------------- 1 | From 59d56797f484e0c61a15fdd210199d316132d969 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Mon, 25 Jan 2021 15:16:19 +0100 4 | Subject: [PATCH 03/13] server: Notify desktop of cursor window changes. 5 | 6 | --- 7 | server/queue.c | 6 +++++- 8 | 1 file changed, 5 insertions(+), 1 deletion(-) 9 | 10 | diff --git a/server/queue.c b/server/queue.c 11 | index 11111111111..11111111111 100644 12 | --- a/server/queue.c 13 | +++ b/server/queue.c 14 | @@ -528,7 +528,11 @@ static int update_desktop_cursor_pos( struct desktop *desktop, user_handle_t win 15 | else if (!win || !is_window_visible( win ) || is_window_transparent( win )) 16 | win = shallow_window_from_point( desktop, x, y ); 17 | 18 | - if (win != desktop->cursor_win) updated = 1; 19 | + if (win != desktop->cursor_win) 20 | + { 21 | + post_desktop_message( desktop, desktop->cursor_change_msg, win, desktop->cursor_handle ); 22 | + updated = 1; 23 | + } 24 | desktop->cursor_win = win; 25 | 26 | return updated; 27 | -- 28 | 2.40.0 29 | 30 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0232-shell32-Fixed-a-rename-behavior.patch: -------------------------------------------------------------------------------- 1 | From: Ming Shao 2 | Subject: [PATH] shell32: Fixed a rename behavior 3 | Message-Id: <20211126031642.18819-1-shaoming@uniontech.com> 4 | Date: Fri, 26 Nov 2021 11:16:42 +0800 5 | 6 | Signed-off-by: Ming Shao 7 | --- 8 | dlls/shell32/shlfileop.c | 8 ++++++++ 9 | 1 file changed, 8 insertions(+) 10 | 11 | diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/shell32/shlfileop.c 14 | +++ b/dlls/shell32/shlfileop.c 15 | @@ -1567,6 +1567,14 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp) 16 | ZeroMemory(&flFrom, sizeof(FILE_LIST)); 17 | ZeroMemory(&flTo, sizeof(FILE_LIST)); 18 | 19 | + //windows seems to take the first path as a valid path when lpFileOp->pTo has multiple paths 20 | + if(lpFileOp->wFunc == FO_RENAME) 21 | + { 22 | + LPWSTR lpRefTo = lpFileOp->pTo; 23 | + while(*lpRefTo++); 24 | + if(*lpRefTo) *lpRefTo = '\0'; 25 | + } 26 | + 27 | if ((ret = parse_file_list(&flFrom, lpFileOp->pFrom))) 28 | return ret; 29 | 30 | 31 | -- 32 | 2.40.0 33 | 34 | -------------------------------------------------------------------------------- /config/ccache.cfg: -------------------------------------------------------------------------------- 1 | #!/hint/bash 2 | # shellcheck disable=SC2034 3 | 4 | ### Ccache configuration ### 5 | 6 | export CCACHE_DIR="${XDG_CACHE_HOME:-${HOME}/.cache}/ccache/wine" 7 | mkdir -p "${CCACHE_DIR}" 8 | if [ -n "${_distcc_hosts}" ] && distcc --version >/dev/null 2>&1; then 9 | export CCACHE_PREFIX='distcc' \ 10 | DISTCC_HOSTS="$(printf '%s\n' "${_distcc_hosts}" | sed "s# #/${_distcc_procs},cpp,lzo #g;s#\$#/${_distcc_procs},cpp,lzo#")" \ 11 | DISTCC_MAX_DISCREPANCY=64 \ 12 | DISTCC_IO_TIMEOUT=$((30*60)) 13 | pump --shutdown || : 14 | eval "$(pump --startup)" 15 | nproc() { printf '%d\n' "${_distcc_procs}"; } 16 | fi 17 | export CCACHE_COMPILERCHECK="string:$(md5sum /usr/bin/gcc | cut -d ' ' -f 1),$(md5sum /usr/bin/x86_64-w64-mingw32-gcc | cut -d ' ' -f 1),$(md5sum /usr/bin/i686-w64-mingw32-gcc | cut -d ' ' -f 1)" \ 18 | CCACHE_BASEDIR="${PWD:-$(pwd)}/src" 19 | ccache --set-config=compression=true \ 20 | --set-config=compression_level=1 \ 21 | --set-config=sloppiness=file_macro,time_macros \ 22 | --set-config=hash_dir=false \ 23 | --set-config=inode_cache=true \ 24 | --set-config=temporary_dir="${CCACHE_DIR}/tmp" 25 | -------------------------------------------------------------------------------- /patches/0012-window-input-and-control-handling/ps0093-p0001-win32u-Clear-validate-flag-if-both-internal-.patch: -------------------------------------------------------------------------------- 1 | From: "Roman Pišl" 2 | Subject: [PATCH 1/2] win32u: Clear validate flag if both internal paint and update now are present. 3 | Message-Id: <20220102163746.7994-1-rpisl@seznam.cz> 4 | Date: Sun, 2 Jan 2022 17:37:45 +0100 5 | 6 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48761 7 | Signed-off-by: Roman Pišl 8 | --- 9 | dlls/win32u/dce.c | 3 +++ 10 | 1 file changed, 3 insertions(+) 11 | 12 | diff --git a/dlls/win32u/dce.c b/dlls/win32u/dce.c 13 | index 11111111111..11111111111 100644 14 | --- a/dlls/win32u/dce.c 15 | +++ b/dlls/win32u/dce.c 16 | @@ -1465,6 +1465,9 @@ BOOL WINAPI NtUserRedrawWindow( HWND hwnd, const RECT *rect, HRGN hrgn, UINT fla 17 | /* process pending expose events before painting */ 18 | if (flags & RDW_UPDATENOW) user_driver->pProcessEvents( QS_PAINT ); 19 | 20 | + if ((flags & (RDW_INTERNALPAINT | RDW_UPDATENOW | RDW_VALIDATE)) == (RDW_INTERNALPAINT | RDW_UPDATENOW | RDW_VALIDATE)) 21 | + flags &= ~RDW_VALIDATE; 22 | + 23 | if (rect && !hrgn) 24 | { 25 | 26 | RECT ordered = *rect; 27 | -- 28 | 2.40.0 29 | 30 | -------------------------------------------------------------------------------- /patches/0012-window-input-and-control-handling/ps0112-p0001-winex11.drv-Always-call-XSync-in-destroy_who.patch: -------------------------------------------------------------------------------- 1 | From: Paul Gofman 2 | Subject: [PATCH 1/1] winex11.drv: Always call XSync() in destroy_whole_window() if there is client window. 3 | Message-Id: 4 | Date: Fri, 17 Jun 2022 15:30:20 +0000 5 | In-Reply-To: 6 | References: 7 | 8 | From: Paul Gofman 9 | 10 | Signed-off-by: Paul Gofman 11 | --- 12 | dlls/winex11.drv/window.c | 2 ++ 13 | 1 file changed, 2 insertions(+) 14 | 15 | diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c 16 | index 11111111111..11111111111 100644 17 | --- a/dlls/winex11.drv/window.c 18 | +++ b/dlls/winex11.drv/window.c 19 | @@ -1898,6 +1898,8 @@ static void destroy_whole_window( struct x11drv_win_data *data, BOOL already_des 20 | } 21 | return; 22 | } 23 | + if (data->client_window && !already_destroyed) 24 | + XSync( data->display, False ); 25 | } 26 | else 27 | { 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0400-winepulse.drv-Don-t-add-a-period-to-real_bufsize_b.patch: -------------------------------------------------------------------------------- 1 | From 88713da4cfcb91dc04c8dd4b3d42aec3dd2188db Mon Sep 17 00:00:00 2001 2 | From: Torge Matthies 3 | Date: Thu, 14 Apr 2022 02:56:03 +0200 4 | Subject: [PATCH] winepulse.drv: Don't add a period to real_bufsize_bytes. 5 | 6 | --- 7 | dlls/winepulse.drv/pulse.c | 2 +- 8 | 1 file changed, 1 insertion(+), 1 deletion(-) 9 | 10 | diff --git a/dlls/winepulse.drv/pulse.c b/dlls/winepulse.drv/pulse.c 11 | index 11111111111..11111111111 100644 12 | --- a/dlls/winepulse.drv/pulse.c 13 | +++ b/dlls/winepulse.drv/pulse.c 14 | @@ -1362,7 +1362,7 @@ static NTSTATUS pulse_create_stream(void *args) 15 | dump_attr(attr); 16 | if (stream->dataflow == eRender) { 17 | size = stream->real_bufsize_bytes = 18 | - stream->bufsize_frames * 2 * pa_frame_size(&stream->ss); 19 | + stream->bufsize_frames * pa_frame_size(&stream->ss); 20 | if (NtAllocateVirtualMemory(GetCurrentProcess(), (void **)&stream->local_buffer, 21 | zero_bits(), &size, MEM_COMMIT, PAGE_READWRITE)) 22 | hr = E_OUTOFMEMORY; 23 | -- 24 | 2.40.0 25 | 26 | -------------------------------------------------------------------------------- /patches/0014-crypto/ps0003-secur32-Disable-CHACHA20-POLY1305-ciphersuites.patch: -------------------------------------------------------------------------------- 1 | From 42ae7b0a6b719c3d5091c8ec1bc72af6db737979 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Tue, 10 Nov 2020 13:04:45 +0100 4 | Subject: [PATCH] secur32: Disable CHACHA20-POLY1305 ciphersuites. 5 | 6 | --- 7 | dlls/secur32/schannel_gnutls.c | 2 +- 8 | 1 file changed, 1 insertion(+), 1 deletion(-) 9 | 10 | diff --git a/dlls/secur32/schannel_gnutls.c b/dlls/secur32/schannel_gnutls.c 11 | index 11111111111..11111111111 100644 12 | --- a/dlls/secur32/schannel_gnutls.c 13 | +++ b/dlls/secur32/schannel_gnutls.c 14 | @@ -434,7 +434,7 @@ static int pull_timeout(gnutls_transport_ptr_t transport, unsigned int timeout) 15 | 16 | static NTSTATUS set_priority(schan_credentials *cred, gnutls_session_t session) 17 | { 18 | - char priority[128] = "NORMAL:%LATEST_RECORD_VERSION", *p; 19 | + char priority[128] = "NORMAL:-CHACHA20-POLY1305:%LATEST_RECORD_VERSION", *p; 20 | BOOL server = !!(cred->credential_use & SECPKG_CRED_INBOUND); 21 | const struct protocol_priority_flag *protocols = 22 | server ? server_protocol_priority_flags : client_protocol_priority_flags; 23 | -- 24 | 2.40.0 25 | 26 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0054-windowscodecs-Support-RGBA-BMP-format.patch: -------------------------------------------------------------------------------- 1 | From 3e66c88191678e036994af39b8033c587b778241 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Thu, 26 Nov 2020 21:37:48 +0100 4 | Subject: [PATCH] windowscodecs: Support RGBA BMP format. 5 | 6 | --- 7 | dlls/windowscodecs/bmpdecode.c | 1 + 8 | 1 file changed, 1 insertion(+) 9 | 10 | diff --git a/dlls/windowscodecs/bmpdecode.c b/dlls/windowscodecs/bmpdecode.c 11 | index 11111111111..11111111111 100644 12 | --- a/dlls/windowscodecs/bmpdecode.c 13 | +++ b/dlls/windowscodecs/bmpdecode.c 14 | @@ -742,6 +742,7 @@ static const struct bitfields_format bitfields_formats[] = { 15 | {16,0xf800,0x7e0,0x1f,0,&GUID_WICPixelFormat16bppBGR565,BmpFrameDecode_ReadUncompressed}, 16 | {32,0xff0000,0xff00,0xff,0,&GUID_WICPixelFormat32bppBGR,BmpFrameDecode_ReadUncompressed}, 17 | {32,0xff0000,0xff00,0xff,0xff000000,&GUID_WICPixelFormat32bppBGRA,BmpFrameDecode_ReadUncompressed}, 18 | + {32,0xff000000,0xff0000,0xff00,0xff,&GUID_WICPixelFormat32bppRGBA,BmpFrameDecode_ReadUncompressed}, 19 | {32,0xff,0xff00,0xff0000,0,&GUID_WICPixelFormat32bppBGR,BmpFrameDecode_ReadRGB8}, 20 | {0} 21 | }; 22 | -- 23 | 2.40.0 24 | 25 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0234-p0004-ext-ms-mf-pal-l2-1-0-Add-new-dll.patch: -------------------------------------------------------------------------------- 1 | From: Mohamad Al-Jaf 2 | Subject: [PATCH 4/4] ext-ms-mf-pal-l2-1-0: Add new dll. 3 | Message-Id: <20211126091906.443008-4-mohamadaljaf@gmail.com> 4 | Date: Fri, 26 Nov 2021 04:19:06 -0500 5 | In-Reply-To: <20211126091906.443008-1-mohamadaljaf@gmail.com> 6 | References: <20211126091906.443008-1-mohamadaljaf@gmail.com> 7 | 8 | Enable Windows 10 msmpeg2vdec.dll to run. 9 | Chromium Embedded Framework is used by some applications 10 | to display videos and requires msmpeg2vdec.dll. 11 | 12 | Signed-off-by: Mohamad Al-Jaf 13 | --- 14 | dlls/apisetschema/apisetschema.spec | 1 + 15 | 1 file changed, 1 insertion(+) 16 | 17 | diff --git a/dlls/apisetschema/apisetschema.spec b/dlls/apisetschema/apisetschema.spec 18 | index 11111111111..11111111111 100644 19 | --- a/dlls/apisetschema/apisetschema.spec 20 | +++ b/dlls/apisetschema/apisetschema.spec 21 | @@ -1,3 +1,4 @@ 22 | +apiset ext-ms-mf-pal-l2-1-0 = kernelbase.dll 23 | apiset api-ms-win-appmodel-runtime-l1-1-2 = kernelbase.dll 24 | apiset api-ms-win-base-bootconfig-l1-1-0 = advapi32.dll 25 | apiset api-ms-win-base-util-l1-1-0 = advapi32.dll 26 | 27 | -- 28 | 2.40.0 29 | 30 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0040-hidclass.sys-Fix-a-leak-in-hid_device_thread.patch: -------------------------------------------------------------------------------- 1 | From: Haoyang Chen 2 | #Subject: [PATCH] hidclass.sys: Fix a leak in hid_device_thread() 3 | Message-Id: 4 | Date: Wed, 9 Sep 2020 14:40:18 +0800 5 | 6 | From daf4ffcceeb9b30c93b6808d3797c4d756d6251f Mon Sep 17 00:00:00 2001 7 | From: Haoyang Chen 8 | Date: Wed, 9 Sep 2020 14:35:58 +0800 9 | Subject: [PATCH] hidclass.sys: Fix a leak in hid_device_thread(). 10 | 11 | Signed-off-by: Haoyang Chen 12 | --- 13 | dlls/hidclass.sys/device.c | 2 ++ 14 | 1 file changed, 2 insertions(+) 15 | 16 | diff --git a/dlls/hidclass.sys/device.c b/dlls/hidclass.sys/device.c 17 | index 11111111111..11111111111 100644 18 | --- a/dlls/hidclass.sys/device.c 19 | +++ b/dlls/hidclass.sys/device.c 20 | @@ -366,6 +366,8 @@ static DWORD CALLBACK hid_device_thread(void *args) 21 | res = WaitForSingleObject(ext->u.pdo.halt_event, polled ? ext->u.pdo.poll_interval : 0); 22 | } while (res == WAIT_TIMEOUT); 23 | 24 | + HeapFree(GetProcessHeap(), 0, packet); 25 | + 26 | TRACE( "device thread exiting, res %#lx\n", res ); 27 | return 1; 28 | } 29 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0075-conhost-Delay-load-gdi32-and-user32.patch: -------------------------------------------------------------------------------- 1 | From: Zebediah Figura 2 | Subject: [PATCH] conhost: Delay-load gdi32 and user32. 3 | Message-Id: <20210212232334.32420-1-z.figura12@gmail.com> 4 | Date: Fri, 12 Feb 2021 17:23:34 -0600 5 | 6 | Both do some nontrivial work on DLL initialization, and conhost may quite 7 | likely never need to display UI. 8 | 9 | Signed-off-by: Zebediah Figura 10 | --- 11 | Actually gdi32 initialization is quite cheap now, at least on my machine, 12 | though user32 still takes over 100 ms. In truth the annoyance for me was not 13 | so much startup time as pollution of +server logs. 14 | 15 | programs/conhost/Makefile.in | 4 ++-- 16 | 1 file changed, 2 insertions(+), 2 deletions(-) 17 | 18 | diff --git a/programs/conhost/Makefile.in b/programs/conhost/Makefile.in 19 | index 11111111111..11111111111 100644 20 | --- a/programs/conhost/Makefile.in 21 | +++ b/programs/conhost/Makefile.in 22 | @@ -1,6 +1,6 @@ 23 | MODULE = conhost.exe 24 | -IMPORTS = user32 gdi32 advapi32 25 | -DELAYIMPORTS = comctl32 26 | +IMPORTS = advapi32 27 | +DELAYIMPORTS = comctl32 gdi32 user32 28 | 29 | EXTRADLLFLAGS = -mwindows -municode 30 | 31 | 32 | -- 33 | 2.40.0 34 | 35 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0296-server-implement-file-random-access-hint-on-OS-X.patch: -------------------------------------------------------------------------------- 1 | From: Luke Deller 2 | Subject: [PATCH resend] server: implement file random access hint on OS X 3 | Message-Id: <20220128110824.9831-1-luke@deller.id.au> 4 | Date: Fri, 28 Jan 2022 22:08:24 +1100 5 | 6 | Disable read ahead for files opened with FILE_RANDOM_ACCESS hint on 7 | Mac OS X and FreeBSD. 8 | 9 | Signed-off-by: Luke Deller 10 | --- 11 | server/fd.c | 7 +++++++ 12 | 1 file changed, 7 insertions(+) 13 | 14 | diff --git a/server/fd.c b/server/fd.c 15 | index 11111111111..11111111111 100644 16 | --- a/server/fd.c 17 | +++ b/server/fd.c 18 | @@ -2291,6 +2291,13 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam 19 | posix_fadvise( fd->unix_fd, 0, 0, POSIX_FADV_RANDOM ); 20 | break; 21 | } 22 | +#elif defined F_RDAHEAD /* Mac OS X, FreeBSD */ 23 | + switch (options & (FILE_SEQUENTIAL_ONLY | FILE_RANDOM_ACCESS)) 24 | + { 25 | + case FILE_RANDOM_ACCESS: 26 | + fcntl( fd->unix_fd, F_RDAHEAD, 0 ); 27 | + break; 28 | + } 29 | #endif 30 | 31 | if (root_fd != -1) fchdir( server_dir_fd ); /* go back to the server dir */ 32 | 33 | -- 34 | 2.40.0 35 | 36 | -------------------------------------------------------------------------------- /patches/0017-networking-and-browser/ps0016-nsiproxy.sys-Only-use-SIN_ROUTER-when-available.patch: -------------------------------------------------------------------------------- 1 | From: Gerald Pfeifer 2 | Subject: [PATCH] nsiproxy.sys: Only use SIN_ROUTER when available 3 | Message-Id: <20210811235318.5315A33E83@hamza.pair.com> 4 | Date: Thu, 12 Aug 2021 01:53:15 +0200 (CEST) 5 | 6 | FreeBSD (and others) fall into the non-Linux case that is guarded by 7 | HAVE_SYS_SYSCTL_H. Alas not all such systems feature SIN_ROUTER which 8 | is used there, so tighten the guard. 9 | 10 | Signed-off-by: Gerald Pfeifer 11 | --- 12 | dlls/nsiproxy.sys/ip.c | 2 +- 13 | 1 file changed, 1 insertion(+), 1 deletion(-) 14 | 15 | diff --git a/dlls/nsiproxy.sys/ip.c b/dlls/nsiproxy.sys/ip.c 16 | index 11111111111..11111111111 100644 17 | --- a/dlls/nsiproxy.sys/ip.c 18 | +++ b/dlls/nsiproxy.sys/ip.c 19 | @@ -1131,7 +1131,7 @@ static NTSTATUS ipv4_neighbour_enumerate_all( void *key_data, UINT key_size, voi 20 | } 21 | fclose( fp ); 22 | } 23 | -#elif defined(HAVE_SYS_SYSCTL_H) 24 | +#elif defined(HAVE_SYS_SYSCTL_H) && defined(SIN_ROUTER) 25 | { 26 | int mib[] = { CTL_NET, PF_ROUTE, 0, AF_INET, NET_RT_FLAGS, RTF_LLINFO }, sinarp_len; 27 | size_t needed; 28 | 29 | -- 30 | 2.40.0 31 | 32 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0005-shell32-Partially-implement-ShellLink_AddDataBlock.patch: -------------------------------------------------------------------------------- 1 | From: Vijay Kiran Kamuju 2 | Subject: [PATCH] shell32: Partially implement ShellLink_AddDataBlock 3 | Message-Id: <20191212105857.1669-1-infyquest@gmail.com> 4 | Date: Thu, 12 Dec 2019 11:58:57 +0100 5 | 6 | Wine Bug: https://bugs.winehq.org/show_bug.cgi?id=38171 7 | Signed-off-by: Vijay Kiran Kamuju 8 | --- 9 | dlls/shell32/shelllink.c | 7 +++++-- 10 | 1 file changed, 5 insertions(+), 2 deletions(-) 11 | 12 | diff --git a/dlls/shell32/shelllink.c b/dlls/shell32/shelllink.c 13 | index 11111111111..11111111111 100644 14 | --- a/dlls/shell32/shelllink.c 15 | +++ b/dlls/shell32/shelllink.c 16 | @@ -2233,8 +2233,11 @@ ShellLink_DataList_Release( IShellLinkDataList* iface ) 17 | static HRESULT WINAPI 18 | ShellLink_AddDataBlock( IShellLinkDataList* iface, void* pDataBlock ) 19 | { 20 | - FIXME("(%p)->(%p): stub\n", iface, pDataBlock); 21 | - return E_NOTIMPL; 22 | + DATABLOCK_HEADER *hdr = (DATABLOCK_HEADER *)pDataBlock; 23 | + 24 | + FIXME("(%p)->(%p) (Size: %d - Signature: %08x): partially implemented.\n", iface, pDataBlock, hdr->cbSize, hdr->dwSignature); 25 | + 26 | + return S_OK; 27 | } 28 | 29 | static HRESULT WINAPI 30 | -------------------------------------------------------------------------------- /config/patches.cfg: -------------------------------------------------------------------------------- 1 | #!/hint/bash 2 | # shellcheck disable=SC2034 3 | 4 | _frogminer_link_patches() { 5 | local patchfile i=0 6 | rm -f "${basedir}"/*.*patch "${basedir}"/*.*revert 7 | local globstar_state="$(shopt -q globstar; echo $?)" 8 | shopt -qs globstar 9 | for patchfile in "${patchdir}"/**/*[^_]/*.*patch "${patchdir}"/**/*[^_]/*.*revert; do 10 | [ -e "${patchfile}" ] || continue 11 | local patchfilename="${patchfile##*/}" 12 | ln -sf "${patchfile#${basedir}/}" "${basedir}/$(printf '%04d' ${i})-${patchfilename%.*}.my${patchfilename##*.}" 13 | i=$((i+1)) 14 | done 15 | if ! [ "$globstar_state" -eq 0 ]; then 16 | shopt -qu globstar 17 | fi 18 | } 19 | 20 | _frogminer_exit_cleanup() { 21 | rm -f "${basedir}"/*.*patch "${basedir}"/*.*revert 22 | } 23 | 24 | _original_exit_cleanup="$(declare -fp _exit_cleanup)" 25 | _exit_cleanup_override_disable=false 26 | _exit_cleanup() { 27 | local exit_code=$? 28 | $_exit_cleanup_override_disable && return $? 29 | _exit_cleanup_override_disable=true 30 | [ $exit_code -eq 0 ] && _frogminer_exit_cleanup 31 | eval "${_original_exit_cleanup}" 32 | ( exit $exit_code ) && : 33 | _exit_cleanup 34 | } 35 | 36 | _frogminer_link_patches 37 | -------------------------------------------------------------------------------- /patches/0012-window-input-and-control-handling/ps0037-winex11.drv-Do-not-call-old_error_handler-if-it-is.patch: -------------------------------------------------------------------------------- 1 | From: Giovanni Mascellani 2 | Subject: [PATCH] winex11.drv: Do not call old_error_handler if it is NULL. 3 | Message-Id: <20210212115800.3997498-1-gmascellani@codeweavers.com> 4 | Date: Fri, 12 Feb 2021 12:58:00 +0100 5 | 6 | Signed-off-by: Giovanni Mascellani 7 | --- 8 | dlls/winex11.drv/x11drv_main.c | 5 ++++- 9 | 1 file changed, 4 insertions(+), 1 deletion(-) 10 | 11 | diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/winex11.drv/x11drv_main.c 14 | +++ b/dlls/winex11.drv/x11drv_main.c 15 | @@ -329,7 +329,10 @@ static int error_handler( Display *display, XErrorEvent *error_evt ) 16 | error_evt->serial, error_evt->request_code ); 17 | assert( 0 ); 18 | } 19 | - old_error_handler( display, error_evt ); 20 | + /* Xlib never returns a NULL previous error handler, but other 21 | + implementations, like Steam's overlay, do. */ 22 | + if (old_error_handler) 23 | + old_error_handler( display, error_evt ); 24 | return 0; 25 | } 26 | 27 | 28 | -- 29 | 2.40.0 30 | 31 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0366-winex11.drv-Fix-crash-when-ctx-is-NULL-in-glxdrv_w.patch: -------------------------------------------------------------------------------- 1 | From: Yutao Meng 2 | Subject: [PATCH] winex11.drv: Fix crash when ctx is NULL in glxdrv_wglSwapBuffers(). 3 | Message-Id: <20220308085704.12679-1-mengyutao@uniontech.com> 4 | Date: Tue, 8 Mar 2022 16:57:04 +0800 5 | 6 | The variable ctx can be NULL, and it is checked before every sync_context() function call. However, it is not checked in the ExtEscape() function call in which it is trying to get the hdc member variable of ctx. 7 | 8 | Signed-off-by: Yutao Meng 9 | --- 10 | dlls/winex11.drv/opengl.c | 2 +- 11 | 1 file changed, 1 insertion(+), 1 deletion(-) 12 | 13 | diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c 14 | index 11111111111..11111111111 100644 15 | --- a/dlls/winex11.drv/opengl.c 16 | +++ b/dlls/winex11.drv/opengl.c 17 | @@ -3521,7 +3521,7 @@ static BOOL glxdrv_wglSwapBuffers( HDC hdc ) 18 | update_window_surface( gl, hwnd ); 19 | release_gl_drawable( gl ); 20 | 21 | - if (escape.drawable) 22 | + if (ctx && escape.drawable) 23 | NtGdiExtEscape( ctx->hdc, NULL, 0, X11DRV_ESCAPE, sizeof(escape), (LPSTR)&escape, 0, NULL ); 24 | return TRUE; 25 | } 26 | 27 | -- 28 | 2.40.0 29 | 30 | -------------------------------------------------------------------------------- /patches/0012-window-input-and-control-handling/ps0026-comdlg32-The-app-might-strcmp-api-filter.patch: -------------------------------------------------------------------------------- 1 | From: "longchao@uniontech.com" 2 | #Subject: [PATCH] comdlg32: The app might strcmp api filter. 3 | Message-Id: <202012240958067337794@uniontech.com> 4 | Date: Thu, 24 Dec 2020 09:58:06 +0800 5 | 6 | From 5d1a13884d58b07474d29f68c6d00fea2cf3e1f1 Mon Sep 17 00:00:00 2001 7 | From: Chao Long 8 | Date: Thu, 24 Dec 2020 09:44:54 +0800 9 | Subject: [PATCH] comdlg32: The app might strcmp api filter. 10 | 11 | Signed-off-by: Chao Long 12 | --- 13 | dlls/comdlg32/filedlg.c | 1 - 14 | 1 file changed, 1 deletion(-) 15 | 16 | diff --git a/dlls/comdlg32/filedlg.c b/dlls/comdlg32/filedlg.c 17 | index 11111111111..11111111111 100644 18 | --- a/dlls/comdlg32/filedlg.c 19 | +++ b/dlls/comdlg32/filedlg.c 20 | @@ -3154,7 +3154,6 @@ static HRESULT FILEDLG95_FILETYPE_Init(HWND hwnd) 21 | if(lpstrFilter) 22 | { 23 | DWORD len; 24 | - CharLowerW(lpstrFilter); /* lowercase */ 25 | len = lstrlenW(lpstrFilter)+1; 26 | fodInfos->ShellInfos.lpstrCurrentFilter = heap_alloc( len * sizeof(WCHAR) ); 27 | lstrcpyW(fodInfos->ShellInfos.lpstrCurrentFilter,lpstrFilter); 28 | 29 | -- 30 | 2.40.0 31 | 32 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0399-configure-Mark-CROSSCC-precious.patch: -------------------------------------------------------------------------------- 1 | From: "Stefan Dösinger" 2 | Subject: [PATCH] configure: Mark CROSSCC precious. 3 | Message-Id: <20220411110447.320820-1-stefan@codeweavers.com> 4 | Date: Mon, 11 Apr 2022 14:04:47 +0300 5 | 6 | So that configure remembers e.g. ccache for building PE files. 7 | 8 | Signed-off-by: Stefan Dösinger 9 | 10 | --- 11 | 12 | One cache to rule them all, one hash to find them, one cache to bring 13 | them all and in .ccache bind them. In the land of $HOME where the disk 14 | is full. 15 | 16 | I probably spent more time making fun about "precious" than figuring out 17 | all this autoconf stuff, so maybe a better solution is needed. 18 | --- 19 | configure.ac | 1 + 20 | 1 file changed, 1 insertion(+) 21 | 22 | diff --git a/configure.ac b/configure.ac 23 | index 11111111111..11111111111 100644 24 | --- a/configure.ac 25 | +++ b/configure.ac 26 | @@ -809,6 +809,7 @@ enable_wineandroid_drv=${enable_wineandroid_drv:-no} 27 | enable_winemac_drv=${enable_winemac_drv:-no} 28 | 29 | dnl Check for cross compiler(s) 30 | +AC_ARG_VAR(CROSSCC, "Cross compiler for PE files") 31 | AC_SUBST(PE_ARCHS,"") 32 | cross_archs= 33 | AS_VAR_SET_IF([enable_archs], 34 | 35 | -- 36 | 2.40.0 37 | 38 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0030-p0004-winetest-Check-GetTokenInformation-return-va.patch: -------------------------------------------------------------------------------- 1 | From: Serge Gautherie 2 | Subject: [PATCH 4/4] winetest: Check GetTokenInformation() return value. 3 | Message-Id: <20200719081916.9964-1-winehq-git_serge_180711@gautherie.fr> 4 | Date: Sun, 19 Jul 2020 10:19:16 +0200 5 | 6 | Signed-off-by: Serge Gautherie 7 | --- 8 | programs/winetest/main.c | 8 ++++++-- 9 | 1 file changed, 6 insertions(+), 2 deletions(-) 10 | 11 | diff --git a/programs/winetest/main.c b/programs/winetest/main.c 12 | index 11111111111..11111111111 100644 13 | --- a/programs/winetest/main.c 14 | +++ b/programs/winetest/main.c 15 | @@ -320,8 +320,12 @@ static int running_as_admin (void) 16 | } 17 | 18 | /* Get the group info from the token */ 19 | - groups_size = 0; 20 | - GetTokenInformation(token, TokenGroups, NULL, 0, &groups_size); 21 | + if (GetTokenInformation(token, TokenGroups, NULL, 0, &groups_size) || 22 | + GetLastError() != ERROR_INSUFFICIENT_BUFFER) 23 | + { 24 | + FreeSid(administrators); 25 | + return -1; 26 | + } 27 | groups = xalloc(groups_size); 28 | if (! GetTokenInformation(token, TokenGroups, groups, groups_size, &groups_size)) 29 | { 30 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0177-p0002-ntoskrnl-Don-t-take-loader-lock-in-find_ldr_.patch: -------------------------------------------------------------------------------- 1 | From: Paul Gofman 2 | Subject: [PATCH v2 2/7] ntoskrnl: Don't take loader lock in find_ldr_module(). 3 | Message-Id: <20211001220041.349604-2-pgofman@codeweavers.com> 4 | Date: Sat, 2 Oct 2021 01:00:36 +0300 5 | In-Reply-To: <20211001220041.349604-1-pgofman@codeweavers.com> 6 | References: <20211001220041.349604-1-pgofman@codeweavers.com> 7 | 8 | Signed-off-by: Paul Gofman 9 | --- 10 | dlls/ntoskrnl.exe/ntoskrnl.c | 3 --- 11 | 1 file changed, 3 deletions(-) 12 | 13 | diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c 14 | index 11111111111..11111111111 100644 15 | --- a/dlls/ntoskrnl.exe/ntoskrnl.c 16 | +++ b/dlls/ntoskrnl.exe/ntoskrnl.c 17 | @@ -3767,15 +3767,12 @@ error: 18 | static LDR_DATA_TABLE_ENTRY *find_ldr_module( HMODULE module ) 19 | { 20 | LDR_DATA_TABLE_ENTRY *ldr; 21 | - ULONG_PTR magic; 22 | 23 | - LdrLockLoaderLock( 0, NULL, &magic ); 24 | if (LdrFindEntryForAddress( module, &ldr )) 25 | { 26 | WARN( "module not found for %p\n", module ); 27 | ldr = NULL; 28 | } 29 | - LdrUnlockLoaderLock( 0, magic ); 30 | 31 | return ldr; 32 | } 33 | 34 | -- 35 | 2.40.0 36 | 37 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0115-twain_32-Fix-crash-by-call-TWAIN_UserSelect-twice.patch: -------------------------------------------------------------------------------- 1 | From: "Jiajin Cui" 2 | #Subject: [PATCH] twain_32: Fix crash by call TWAIN_UserSelect twice. 3 | Message-Id: <202106012122393190051@uniontech.com> 4 | Date: Tue, 1 Jun 2021 21:22:43 +0800 5 | 6 | From 4bab7a3348a4ce192ca60a649eca066310b6fb95 Mon Sep 17 00:00:00 2001 7 | From: Jiajin Cui 8 | Date: Tue, 1 Jun 2021 21:13:54 +0800 9 | Subject: [PATCH] twain_32: Fix crash by call TWAIN_UserSelect twice. 10 | 11 | The DG_CONTROL\DAT_PARENT\MSG_OPENDSM operation may be the window handle or the address of the window handle. 12 | 13 | Signed-off-by: Jiajin Cui 14 | --- 15 | dlls/twain_32/dsm_ctrl.c | 3 +++ 16 | 1 file changed, 3 insertions(+) 17 | 18 | diff --git a/dlls/twain_32/dsm_ctrl.c b/dlls/twain_32/dsm_ctrl.c 19 | index 11111111111..11111111111 100644 20 | --- a/dlls/twain_32/dsm_ctrl.c 21 | +++ b/dlls/twain_32/dsm_ctrl.c 22 | @@ -436,6 +436,9 @@ TW_UINT16 TWAIN_UserSelect (pTW_IDENTITY pOrigin, TW_MEMREF pData) 23 | 24 | twain_autodetect(); 25 | 26 | + if (!IsWindow(parent)) 27 | + parent = *(HWND*)DSM_parent; 28 | + 29 | if (!IsWindow(parent)) 30 | parent = NULL; 31 | 32 | 33 | -- 34 | 2.40.0 35 | 36 | -------------------------------------------------------------------------------- /patches/0010-shared-memory/0040-server-Only-return-full-keystate-when-requested.patch: -------------------------------------------------------------------------------- 1 | From 1fc99ceb6a3d1adfcd0330be374ba6abe50543f7 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Tue, 17 Aug 2021 16:25:35 +0200 4 | Subject: [PATCH 40/44] server: Only return full keystate when requested. 5 | 6 | --- 7 | server/queue.c | 4 ++-- 8 | 1 file changed, 2 insertions(+), 2 deletions(-) 9 | 10 | diff --git a/server/queue.c b/server/queue.c 11 | index 11111111111..11111111111 100644 12 | --- a/server/queue.c 13 | +++ b/server/queue.c 14 | @@ -3355,7 +3355,7 @@ DECL_HANDLER(get_key_state) 15 | desktop->shared->keystate[req->key & 0xff] &= ~0x40; 16 | SHARED_WRITE_END( &desktop->shared->seq ); 17 | } 18 | - set_reply_data( (void *)desktop->shared->keystate, size ); 19 | + else set_reply_data( (void *)desktop->shared->keystate, size ); 20 | release_object( desktop ); 21 | } 22 | else 23 | @@ -3367,7 +3367,7 @@ DECL_HANDLER(get_key_state) 24 | sync_input_keystate( queue->input ); 25 | reply->state = keystate[req->key & 0xff]; 26 | } 27 | - set_reply_data( keystate, size ); 28 | + else set_reply_data( keystate, size ); 29 | } 30 | } 31 | 32 | 33 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0087-p0003-msxml3-Don-t-force-UTF-8-when-saving-XML-doc.patch: -------------------------------------------------------------------------------- 1 | From: Dmitry Timoshkov 2 | Subject: [PATCH 3/3] msxml3: Don't force UTF-8 when saving XML document. 3 | Message-Id: <20210319182532.0d2062c4790573af9d3385d4@baikal.ru> 4 | Date: Fri, 19 Mar 2021 18:25:32 +0300 5 | 6 | This is the only place where xmlSaveToIO() is forced to use UTF-8 for an 7 | output document, other places specify NULL for the default encoding. 8 | 9 | This doesn't completely fix the saved XML contents, but at least XML document 10 | has proper encoding now. 11 | 12 | Signed-off-by: Dmitry Timoshkov 13 | --- 14 | dlls/msxml3/domdoc.c | 2 +- 15 | 1 file changed, 1 insertion(+), 1 deletion(-) 16 | 17 | diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c 18 | index 11111111111..11111111111 100644 19 | --- a/dlls/msxml3/domdoc.c 20 | +++ b/dlls/msxml3/domdoc.c 21 | @@ -1437,7 +1437,7 @@ static HRESULT WINAPI domdoc_get_xml( 22 | return E_OUTOFMEMORY; 23 | 24 | options = XML_SAVE_FORMAT | XML_SAVE_NO_DECL; 25 | - ctxt = xmlSaveToIO(domdoc_get_xml_writecallback, NULL, buf, "UTF-8", options); 26 | + ctxt = xmlSaveToIO(domdoc_get_xml_writecallback, NULL, buf, NULL, options); 27 | 28 | if(!ctxt) 29 | { 30 | 31 | -- 32 | 2.40.0 33 | 34 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0244-p0004-WIP-ntdll-Add-a-fast-path-for-ASCII-lower-up.patch: -------------------------------------------------------------------------------- 1 | From a312756ebca7b5d025aad4b19a21f1ba840d3955 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Sat, 20 Nov 2021 19:15:08 +0100 4 | Subject: [PATCH 4/4] WIP: ntdll: Add a fast path for ASCII lower/upper case. 5 | 6 | --- 7 | dlls/ntdll/unix/unix_private.h | 4 ++++ 8 | 1 file changed, 4 insertions(+) 9 | 10 | diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h 11 | index 11111111111..11111111111 100644 12 | --- a/dlls/ntdll/unix/unix_private.h 13 | +++ b/dlls/ntdll/unix/unix_private.h 14 | @@ -494,11 +494,15 @@ extern enum loadorder get_load_order( const UNICODE_STRING *nt_name ) DECLSPEC_H 15 | 16 | static inline WCHAR ntdll_towupper( WCHAR ch ) 17 | { 18 | + if (ch >= 'a' && ch <= 'z') return ch - 'a' + 'A'; 19 | + if (ch <= 0x7f) return ch; 20 | return ch + uctable[uctable[uctable[ch >> 8] + ((ch >> 4) & 0x0f)] + (ch & 0x0f)]; 21 | } 22 | 23 | static inline WCHAR ntdll_towlower( WCHAR ch ) 24 | { 25 | + if (ch >= 'A' && ch <= 'Z') return ch - 'A' + 'a'; 26 | + if (ch <= 0x7f) return ch; 27 | return ch + lctable[lctable[lctable[ch >> 8] + ((ch >> 4) & 0x0f)] + (ch & 0x0f)]; 28 | } 29 | 30 | -- 31 | 2.40.0 32 | 33 | -------------------------------------------------------------------------------- /patches/0011-rbernon-patches/0000-reverts/0001-Revert-user32-Before-asking-a-WM-to-activate-a-windo.patch: -------------------------------------------------------------------------------- 1 | From 8c96e6ab640826c55abb599c95eac665cc73eae6 Mon Sep 17 00:00:00 2001 2 | From: Torge Matthies 3 | Date: Sat, 23 Apr 2022 04:21:51 +0200 4 | Subject: [PATCH 1/2] Revert "user32: Before asking a WM to activate a window 5 | make sure that the window is in foreground and not minimized." 6 | 7 | This reverts staging patch winex11-_NET_ACTIVE_WINDOW/0002-user32-Before-asking-a-WM-to-activate-a-window-make-.patch 8 | --- 9 | dlls/win32u/input.c | 4 ---- 10 | 1 file changed, 4 deletions(-) 11 | 12 | diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c 13 | index 11111111111..11111111111 100644 14 | --- a/dlls/win32u/input.c 15 | +++ b/dlls/win32u/input.c 16 | @@ -1913,10 +1913,6 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus ) 17 | 18 | if (NtUserGetAncestor( hwnd, GA_PARENT ) == get_desktop_window()) 19 | NtUserPostMessage( get_desktop_window(), WM_PARENTNOTIFY, WM_NCACTIVATE, (LPARAM)hwnd ); 20 | - 21 | - if (hwnd == NtUserGetForegroundWindow() && !is_iconic( hwnd )) 22 | - NtUserSetActiveWindow( hwnd ); 23 | - 24 | } 25 | 26 | user_driver->pSetActiveWindow( hwnd ); 27 | -- 28 | 2.40.0 29 | 30 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0174-p0003-ddraw-Declare-the-same-number-of-planes-as-c.patch: -------------------------------------------------------------------------------- 1 | From: "Rémi Bernon" 2 | Subject: [PATCH 3/5] ddraw: Declare the same number of planes as compute_sphere_visibility takes (GCC 11). 3 | Message-Id: <20210927085833.544992-3-rbernon@codeweavers.com> 4 | Date: Mon, 27 Sep 2021 10:58:31 +0200 5 | In-Reply-To: <20210927085833.544992-1-rbernon@codeweavers.com> 6 | References: <20210927085833.544992-1-rbernon@codeweavers.com> 7 | 8 | Signed-off-by: Rémi Bernon 9 | --- 10 | dlls/ddraw/device.c | 2 +- 11 | 1 file changed, 1 insertion(+), 1 deletion(-) 12 | 13 | diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c 14 | index 11111111111..11111111111 100644 15 | --- a/dlls/ddraw/device.c 16 | +++ b/dlls/ddraw/device.c 17 | @@ -4540,7 +4540,7 @@ static HRESULT WINAPI d3d_device3_ComputeSphereVisibility(IDirect3DDevice3 *ifac 18 | D3DVECTOR *centers, D3DVALUE *radii, DWORD sphere_count, DWORD flags, DWORD *return_values) 19 | { 20 | static const DWORD enabled_planes = 0x3f; 21 | - struct wined3d_vec4 plane[6]; 22 | + struct wined3d_vec4 plane[12]; 23 | unsigned int i, j; 24 | 25 | 26 | TRACE("iface %p, centers %p, radii %p, sphere_count %lu, flags %#lx, return_values %p.\n", 27 | -- 28 | 2.40.0 29 | 30 | -------------------------------------------------------------------------------- /patches/9999-diffs/omit-leaf-frame-pointers.patch: -------------------------------------------------------------------------------- 1 | diff --git a/configure.ac b/configure.ac 2 | index 11111111111..11111111111 100644 3 | --- a/configure.ac 4 | +++ b/configure.ac 5 | @@ -956,7 +956,7 @@ do 6 | WINE_TRY_PE_CFLAGS([-Wabsolute-value]) 7 | 8 | case $wine_arch in 9 | - i386) WINE_TRY_PE_CFLAGS([-fno-omit-frame-pointer]) 10 | + i386) WINE_TRY_PE_CFLAGS([-fno-omit-frame-pointer -momit-leaf-frame-pointer]) 11 | WINE_TRY_PE_CFLAGS([-Wl,--disable-stdcall-fixup], 12 | [AS_VAR_APPEND([${wine_arch}_LDFLAGS],[" -Wl,--disable-stdcall-fixup"])]) ;; 13 | x86_64) WINE_TRY_PE_CFLAGS([-Wformat-overflow]) 14 | @@ -1963,7 +1963,7 @@ char*f(const char *h,char n) {return strchr(h,n);}]])],[ac_cv_c_logicalop_noisy= 15 | 16 | case $host_cpu in 17 | dnl gcc-4.6+ omits frame pointers by default, breaking some copy protections 18 | - *i[[3456789]]86*) WINE_TRY_CFLAGS([-fno-omit-frame-pointer],[MSVCRTFLAGS="$MSVCRTFLAGS -fno-omit-frame-pointer"]) ;; 19 | + *i[[3456789]]86*) WINE_TRY_CFLAGS([-fno-omit-frame-pointer -momit-leaf-frame-pointer],[MSVCRTFLAGS="$MSVCRTFLAGS -fno-omit-frame-pointer -momit-leaf-frame-pointer"]) ;; 20 | *x86_64*) 21 | case $host_os in 22 | dnl Mingw uses Windows 64-bit types, not Unix ones 23 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0175-p0002-win32u-ensure-init_region-sets-pReg-fields-o.patch: -------------------------------------------------------------------------------- 1 | From: Eric Pouech 2 | Subject: [PATCH 2/4] win32u: ensure init_region() sets pReg fields on all code path (GCC11) 3 | Message-Id: <163317638516.285529.4737602410547049339.stgit@euterpe> 4 | Date: Sat, 2 Oct 2021 14:06:25 +0200 5 | In-Reply-To: <163317637739.285529.489808632054114548.stgit@euterpe> 6 | References: <163317637739.285529.489808632054114548.stgit@euterpe> 7 | 8 | - otherwise, it generates a warning in destroy_region() 9 | 10 | Signed-off-by: Eric Pouech 11 | 12 | --- 13 | dlls/win32u/region.c | 6 +++++- 14 | 1 file changed, 5 insertions(+), 1 deletion(-) 15 | 16 | diff --git a/dlls/win32u/region.c b/dlls/win32u/region.c 17 | index 11111111111..11111111111 100644 18 | --- a/dlls/win32u/region.c 19 | +++ b/dlls/win32u/region.c 20 | @@ -407,7 +407,11 @@ static BOOL init_region( WINEREGION *pReg, INT n ) 21 | 22 | if (n > RGN_DEFAULT_RECTS) 23 | { 24 | - if (n > INT_MAX / sizeof(RECT)) return FALSE; 25 | + if (n > INT_MAX / sizeof(RECT)) 26 | + { 27 | + pReg->rects = NULL; 28 | + return FALSE; 29 | + } 30 | if (!(pReg->rects = malloc( n * sizeof( RECT ) ))) 31 | return FALSE; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /patches/9999-diffs/winsta-cache.patch: -------------------------------------------------------------------------------- 1 | diff --git a/dlls/win32u/winstation.c b/dlls/win32u/winstation.c 2 | index 11111111111..11111111111 100644 3 | --- a/dlls/win32u/winstation.c 4 | +++ b/dlls/win32u/winstation.c 5 | @@ -102,19 +102,25 @@ BOOL SYSCALL NtUserCloseWindowStation( HWINSTA handle ) 6 | return ret; 7 | } 8 | 9 | +static HWINSTA winsta_cache = INVALID_HANDLE_VALUE; 10 | + 11 | /*********************************************************************** 12 | * NtUSerGetProcessWindowStation (win32u.@) 13 | */ 14 | HWINSTA SYSCALL NtUserGetProcessWindowStation(void) 15 | { 16 | + HWINSTA cache = winsta_cache; 17 | HWINSTA ret = 0; 18 | 19 | + if (cache != INVALID_HANDLE_VALUE) return cache; 20 | + 21 | SERVER_START_REQ( get_process_winstation ) 22 | { 23 | if (!wine_server_call_err( req )) 24 | ret = wine_server_ptr_handle( reply->handle ); 25 | } 26 | SERVER_END_REQ; 27 | + winsta_cache = ret; 28 | return ret; 29 | } 30 | 31 | @@ -125,6 +131,8 @@ BOOL SYSCALL NtUserSetProcessWindowStation( HWINSTA handle ) 32 | { 33 | BOOL ret; 34 | 35 | + winsta_cache = INVALID_HANDLE_VALUE; 36 | + 37 | SERVER_START_REQ( set_process_winstation ) 38 | { 39 | req->handle = wine_server_obj_handle( handle ); 40 | -------------------------------------------------------------------------------- /patches/0012-window-input-and-control-handling/ps0006-p0002-win32u-Fix-a-pop-up-window-is-not-visible-wh.patch: -------------------------------------------------------------------------------- 1 | From: "Haidong Yu" 2 | #Subject: [PATCH v2 2/2] win32u: Fix a pop-up window is not visible when its owned window showed with SW_SHOWNOACTIVATE option. 3 | Message-Id: <3eb0dd5b.1d83.172f956cb3a.Coremail.yhd986@163.com> 4 | Date: Sun, 28 Jun 2020 13:11:54 +0800 (CST) 5 | 6 | From 37a26e606649d80312afcf56e297037af32b9396 Mon Sep 17 00:00:00 2001 7 | From: Haidong Yu 8 | Date: Sun, 28 Jun 2020 11:33:13 +0800 9 | Subject: [PATCH v2 2/2] win32u: Fix a pop-up window is not visible when its 10 | owned window showed with SW_SHOWNOACTIVATE option. 11 | 12 | Signed-off-by: Haidong Yu 13 | --- 14 | dlls/win32u/window.c | 1 + 15 | 1 file changed, 1 insertion(+) 16 | 17 | diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c 18 | index 11111111111..11111111111 100644 19 | --- a/dlls/win32u/window.c 20 | +++ b/dlls/win32u/window.c 21 | @@ -4130,6 +4130,7 @@ static UINT window_min_maximize( HWND hwnd, UINT cmd, RECT *rect ) 22 | 23 | case SW_SHOWNOACTIVATE: 24 | win_set_flags( hwnd, 0, WIN_RESTORE_MAX ); 25 | + show_owned_popups(hwnd, TRUE); 26 | /* fall through */ 27 | case SW_SHOWNORMAL: 28 | case SW_RESTORE: 29 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0065-conhost-Keep-horizontal-position-of-cursor-within-.patch: -------------------------------------------------------------------------------- 1 | From: "Roman Pišl" 2 | Subject: [PATCH] conhost: Keep horizontal position of cursor within screen width. 3 | Message-Id: <20210131000407.13060-1-rpisl@seznam.cz> 4 | Date: Sun, 31 Jan 2021 01:04:07 +0100 5 | 6 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50581 7 | 8 | Signed-off-by: Roman Pišl 9 | --- 10 | programs/conhost/conhost.c | 4 +++- 11 | 1 file changed, 3 insertions(+), 1 deletion(-) 12 | 13 | diff --git a/programs/conhost/conhost.c b/programs/conhost/conhost.c 14 | index 11111111111..11111111111 100644 15 | --- a/programs/conhost/conhost.c 16 | +++ b/programs/conhost/conhost.c 17 | @@ -402,7 +402,9 @@ static void update_output( struct screen_buffer *screen_buffer, RECT *rect ) 18 | size = WideCharToMultiByte( get_tty_cp( screen_buffer->console ), 0, 19 | &wch, 1, buf, sizeof(buf), NULL, NULL ); 20 | tty_write( screen_buffer->console, buf, size ); 21 | - screen_buffer->console->tty_cursor_x++; 22 | + 23 | + if (screen_buffer->console->tty_cursor_x < screen_buffer->width - 1) 24 | + screen_buffer->console->tty_cursor_x++; 25 | } 26 | } 27 | 28 | 29 | -- 30 | 2.40.0 31 | 32 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0435-p0005-HACK-server-Do-not-use-an-atomic-instruction.patch: -------------------------------------------------------------------------------- 1 | From 481c3131ad21fc62f45dc4b7c421926805d95285 Mon Sep 17 00:00:00 2001 2 | From: Torge Matthies 3 | Date: Mon, 15 Aug 2022 21:03:25 +0200 4 | Subject: [PATCH 5/7] HACK: server: Do not use an atomic instruction to reset 5 | futex. 6 | 7 | --- 8 | server/thread.c | 7 +++++-- 9 | 1 file changed, 5 insertions(+), 2 deletions(-) 10 | 11 | diff --git a/server/thread.c b/server/thread.c 12 | index 11111111111..11111111111 100644 13 | --- a/server/thread.c 14 | +++ b/server/thread.c 15 | @@ -509,8 +509,11 @@ static void *request_shm_thread(void *param) 16 | request_shm = thread->request_shm; 17 | if (!request_shm_fd || !request_shm) 18 | goto done_locked; 19 | - val = __sync_val_compare_and_swap( &request_shm->futex, 1, 0 ); 20 | - if (val != 1 && val != -1) 21 | + __sync_synchronize(); 22 | + val = request_shm->futex; 23 | + if (val == 1) 24 | + request_shm->futex = 0; 25 | + else if (val != -1) 26 | fatal_protocol_error( thread, "unknown futex state %d\n", val ); 27 | pthread_mutex_unlock( &global_lock ); 28 | //syscall( __NR_futex, &request_shm->futex, FUTEX_WAKE, 1, NULL, NULL, 0 ); 29 | -- 30 | 2.40.0 31 | 32 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0030-p0002-userenv-Check-GetTokenInformation-return-val.patch: -------------------------------------------------------------------------------- 1 | From: Serge Gautherie 2 | Subject: [PATCH 2/4] userenv: Check GetTokenInformation() return value. 3 | Message-Id: <20200719081845.9536-1-winehq-git_serge_180711@gautherie.fr> 4 | Date: Sun, 19 Jul 2020 10:18:45 +0200 5 | 6 | Signed-off-by: Serge Gautherie 7 | --- 8 | dlls/userenv/userenv_main.c | 7 +++++-- 9 | 1 file changed, 5 insertions(+), 2 deletions(-) 10 | 11 | diff --git a/dlls/userenv/userenv_main.c b/dlls/userenv/userenv_main.c 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/userenv/userenv_main.c 14 | +++ b/dlls/userenv/userenv_main.c 15 | @@ -420,8 +420,11 @@ BOOL WINAPI GetUserProfileDirectoryW( HANDLE hToken, LPWSTR lpProfileDir, 16 | return FALSE; 17 | } 18 | 19 | - len = 0; 20 | - GetTokenInformation( hToken, TokenUser, NULL, 0, &len ); 21 | + if (GetTokenInformation( hToken, TokenUser, NULL, 0, &len )) 22 | + { 23 | + SetLastError( ERROR_SUCCESS ); 24 | + return FALSE; 25 | + } 26 | if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) return FALSE; 27 | if (!(t = HeapAlloc( GetProcessHeap(), 0, len ))) return FALSE; 28 | if (!GetTokenInformation( hToken, TokenUser, t, len, &len )) goto done; 29 | -------------------------------------------------------------------------------- /patches/9999-diffs/audio_driver_envar.patch: -------------------------------------------------------------------------------- 1 | diff --git a/dlls/mmdevapi/main.c b/dlls/mmdevapi/main.c 2 | index 11111111111..11111111111 100644 3 | --- a/dlls/mmdevapi/main.c 4 | +++ b/dlls/mmdevapi/main.c 5 | @@ -139,19 +139,20 @@ static BOOL WINAPI init_driver(INIT_ONCE *once, void *param, void **context) 6 | if(RegOpenKeyW(HKEY_CURRENT_USER, drv_keyW, &key) == ERROR_SUCCESS){ 7 | DWORD size = sizeof(reg_list); 8 | 9 | - if(RegQueryValueExW(key, L"Audio", 0, NULL, (BYTE*)reg_list, &size) == ERROR_SUCCESS){ 10 | - if(reg_list[0] == '\0'){ 11 | - TRACE("User explicitly chose no driver\n"); 12 | - RegCloseKey(key); 13 | - return TRUE; 14 | - } 15 | - 16 | + if(RegQueryValueExW(key, L"Audio", 0, NULL, (BYTE*)reg_list, &size) == ERROR_SUCCESS) 17 | driver_list = reg_list; 18 | - } 19 | 20 | RegCloseKey(key); 21 | } 22 | 23 | + if ((p = _wgetenv(L"STAGING_AUDIO_DRIVER"))) 24 | + driver_list = p; 25 | + 26 | + if(driver_list[0] == '\0'){ 27 | + TRACE("User explicitly chose no driver\n"); 28 | + return TRUE; 29 | + } 30 | + 31 | TRACE("Loading driver list %s\n", wine_dbgstr_w(driver_list)); 32 | for(next = p = driver_list; next; p = next + 1){ 33 | next = wcschr(p, ','); 34 | -------------------------------------------------------------------------------- /patches/0012-window-input-and-control-handling/ps0118-Server-Synchronise-keystate-when-locking-input-whe.patch: -------------------------------------------------------------------------------- 1 | From ded4c3b690446edbeef5f83e3a24493d92eba062 Mon Sep 17 00:00:00 2001 2 | From: Kevin Chabot 3 | Date: Tue, 13 Dec 2022 19:25:51 -0500 4 | Subject: [PATCH] Server: Synchronise keystate when locking input when the 5 | hardware message is queued. 6 | 7 | Fix an issue where modifier keys stay stuck when using a drawing tablet 8 | and a keyboard using Clip Studio Paint. 9 | 10 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=33056 11 | --- 12 | server/queue.c | 6 +++++- 13 | 1 file changed, 5 insertions(+), 1 deletion(-) 14 | 15 | diff --git a/server/queue.c b/server/queue.c 16 | index 11111111111..11111111111 100644 17 | --- a/server/queue.c 18 | +++ b/server/queue.c 19 | @@ -667,7 +667,11 @@ static inline void set_queue_bits( struct msg_queue *queue, unsigned int bits ) 20 | { 21 | if (bits & (QS_KEY | QS_MOUSEBUTTON)) 22 | { 23 | - if (!queue->keystate_lock) lock_input_keystate( queue->input ); 24 | + if (!queue->keystate_lock) 25 | + { 26 | + sync_input_keystate( queue->input ); 27 | + lock_input_keystate( queue->input ); 28 | + } 29 | queue->keystate_lock = 1; 30 | } 31 | queue->wake_bits |= bits; 32 | -- 33 | 2.40.0 34 | 35 | -------------------------------------------------------------------------------- /patches/0017-networking-and-browser/ps0019-iphlpapi-In-dns_info_alloc-prevent-usage-of-uninit.patch: -------------------------------------------------------------------------------- 1 | From: Fabian Maurer 2 | Subject: [PATCH] iphlpapi: In dns_info_alloc prevent usage of uninitialized variable 3 | Message-Id: <20210824182612.59507-1-dark.shadow4@web.de> 4 | Date: Tue, 24 Aug 2021 20:26:12 +0200 5 | 6 | This can happen when the GAA_FLAG_SKIP_DNS_SERVER flag is set. 7 | 8 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51655 9 | Signed-off-by: Fabian Maurer 10 | --- 11 | dlls/iphlpapi/iphlpapi_main.c | 2 +- 12 | 1 file changed, 1 insertion(+), 1 deletion(-) 13 | 14 | diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c 15 | index 11111111111..11111111111 100644 16 | --- a/dlls/iphlpapi/iphlpapi_main.c 17 | +++ b/dlls/iphlpapi/iphlpapi_main.c 18 | @@ -1137,7 +1137,7 @@ static DWORD dns_info_alloc( IP_ADAPTER_ADDRESSES *aa, ULONG family, ULONG flags 19 | char buf[FIELD_OFFSET(DNS_ADDR_ARRAY, AddrArray[3])]; 20 | IP_ADAPTER_DNS_SERVER_ADDRESS *dns, **next; 21 | DWORD query = dns_servers_query_code( family ); 22 | - DWORD err, i, size, attempt, sockaddr_len; 23 | + DWORD err = 0, i, size, attempt, sockaddr_len; 24 | WCHAR name[MAX_ADAPTER_NAME_LENGTH + 1]; 25 | DNS_ADDR_ARRAY *servers; 26 | 27 | WCHAR *search; 28 | -- 29 | 2.40.0 30 | 31 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0406-p0002-dlls-kernelbase-fix-CreateProcess-with-CREAT.patch: -------------------------------------------------------------------------------- 1 | From: Eric Pouech 2 | Subject: [PATCH 2/4] dlls/kernelbase: fix CreateProcess with CREATE_NO_WINDOW when no std handles are inherited 3 | Message-Id: <165002691036.110302.18093521933405244830.stgit@euterpe> 4 | Date: Fri, 15 Apr 2022 14:48:30 +0200 5 | In-Reply-To: <165002597087.110302.4051917761389773812.stgit@euterpe> 6 | References: <165002597087.110302.4051917761389773812.stgit@euterpe> 7 | 8 | Signed-off-by: Eric Pouech 9 | 10 | --- 11 | dlls/kernelbase/process.c | 2 +- 12 | 1 file changed, 1 insertion(+), 1 deletion(-) 13 | 14 | diff --git a/dlls/kernelbase/process.c b/dlls/kernelbase/process.c 15 | index 11111111111..11111111111 100644 16 | --- a/dlls/kernelbase/process.c 17 | +++ b/dlls/kernelbase/process.c 18 | @@ -210,7 +210,7 @@ static RTL_USER_PROCESS_PARAMETERS *create_process_params( const WCHAR *filename 19 | params->hStdOutput = startup->hStdOutput; 20 | params->hStdError = startup->hStdError; 21 | } 22 | - else if (flags & (DETACHED_PROCESS | CREATE_NEW_CONSOLE)) 23 | + else if (flags & (DETACHED_PROCESS | CREATE_NEW_CONSOLE | CREATE_NO_WINDOW)) 24 | { 25 | params->hStdInput = INVALID_HANDLE_VALUE; 26 | params->hStdOutput = INVALID_HANDLE_VALUE; 27 | 28 | -------------------------------------------------------------------------------- /patches/0011-rbernon-patches/0007-wip-rawinput-v1/0006-user32-Add-support-for-absolute-rawinput-messages.patch: -------------------------------------------------------------------------------- 1 | From 833c0fee775b84ad834963e839493b78e0c90278 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Mon, 25 Oct 2021 11:26:43 +0200 4 | Subject: [PATCH 06/12] user32: Add support for absolute rawinput messages. 5 | 6 | --- 7 | dlls/win32u/rawinput.c | 3 ++- 8 | 1 file changed, 2 insertions(+), 1 deletion(-) 9 | 10 | diff --git a/dlls/win32u/rawinput.c b/dlls/win32u/rawinput.c 11 | index 11111111111..11111111111 100644 12 | --- a/dlls/win32u/rawinput.c 13 | +++ b/dlls/win32u/rawinput.c 14 | @@ -96,7 +96,8 @@ static bool rawinput_from_hardware_message( RAWINPUT *rawinput, const struct har 15 | rawinput->header.hDevice = WINE_MOUSE_HANDLE; 16 | rawinput->header.wParam = 0; 17 | 18 | - rawinput->data.mouse.usFlags = MOUSE_MOVE_RELATIVE; 19 | + rawinput->data.mouse.usFlags = msg_data->flags & MOUSEEVENTF_ABSOLUTE ? MOUSE_MOVE_ABSOLUTE : MOUSE_MOVE_RELATIVE; 20 | + if (msg_data->flags & MOUSEEVENTF_VIRTUALDESK) rawinput->data.mouse.usFlags |= MOUSE_VIRTUAL_DESKTOP; 21 | rawinput->data.mouse.usButtonFlags = 0; 22 | rawinput->data.mouse.usButtonData = 0; 23 | for (i = 1; i < ARRAY_SIZE(button_flags); ++i) 24 | -- 25 | 2.40.0 26 | 27 | -------------------------------------------------------------------------------- /patches/0011-rbernon-patches/0007-wip-rawinput-v1/0005-server-Clear-the-MOUSEEVENTF_-ABSOLUTE-VIRTUALDESK-f.patch: -------------------------------------------------------------------------------- 1 | From ce2f8684401efa840bab34e06be91ac169d3d73b Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Thu, 28 Oct 2021 09:11:02 +0200 4 | Subject: [PATCH 05/12] server: Clear the MOUSEEVENTF_(ABSOLUTE|VIRTUALDESK) 5 | flags. 6 | 7 | For rawinput messages, as user32 is currently only expecting relative 8 | motion. 9 | --- 10 | server/queue.c | 2 +- 11 | 1 file changed, 1 insertion(+), 1 deletion(-) 12 | 13 | diff --git a/server/queue.c b/server/queue.c 14 | index 11111111111..11111111111 100644 15 | --- a/server/queue.c 16 | +++ b/server/queue.c 17 | @@ -2076,7 +2076,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons 18 | msg_data = &raw_msg.data; 19 | msg_data->info = input->mouse.info; 20 | msg_data->size = sizeof(*msg_data); 21 | - msg_data->flags = flags; 22 | + msg_data->flags = flags & ~(MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_VIRTUALDESK); 23 | msg_data->rawinput.type = RIM_TYPEMOUSE; 24 | msg_data->rawinput.mouse.x = x - desktop->shared->cursor.x; 25 | msg_data->rawinput.mouse.y = y - desktop->shared->cursor.y; 26 | -- 27 | 2.40.0 28 | 29 | -------------------------------------------------------------------------------- /patches/0011-rbernon-patches/0012-wip-user32-tests/0006-user32-tests-Ignore-internal-messages-in-GetMessageP.patch: -------------------------------------------------------------------------------- 1 | From 6e31fdcd235238d0907d35967f012a855727683b Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Sat, 29 Jan 2022 19:10:37 +0100 4 | Subject: [PATCH 06/16] user32/tests: Ignore internal messages in 5 | GetMessagePos. 6 | 7 | --- 8 | dlls/user32/tests/win.c | 9 ++------- 9 | 1 file changed, 2 insertions(+), 7 deletions(-) 10 | 11 | diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/user32/tests/win.c 14 | +++ b/dlls/user32/tests/win.c 15 | @@ -11173,13 +11173,8 @@ static void test_GetMessagePos(void) 16 | 17 | SetTimer(button, 1, 250, NULL); 18 | SetCursorPos(330, 350); 19 | - GetMessageA(&msg, button, 0, 0); 20 | - while (msg.message == WM_PAINT) 21 | - { 22 | - UpdateWindow( button ); 23 | - GetMessageA(&msg, button, 0, 0); 24 | - } 25 | - ok(msg.message == WM_TIMER, "msg.message = %x\n", msg.message); 26 | + while (GetMessageA(&msg, button, 0, 0) && msg.message != WM_TIMER) 27 | + if (msg.message == WM_PAINT) UpdateWindow(button); 28 | pos = GetMessagePos(); 29 | ok(pos == MAKELONG(330, 350), "pos = %08lx\n", pos); 30 | KillTimer(button, 1); 31 | -- 32 | 2.40.0 33 | 34 | -------------------------------------------------------------------------------- /patches/0011-rbernon-patches/0012-wip-user32-tests/0008-user32-tests-Wait-indefinitely-for-the-child-process.patch: -------------------------------------------------------------------------------- 1 | From c54436e38a76b691919145bc4814622cc8d71141 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Tue, 12 Nov 2019 16:11:55 +0100 4 | Subject: [PATCH 08/16] user32/tests: Wait indefinitely for the child process 5 | to notify. 6 | 7 | We could create the process, so now it should eventually signal the 8 | event unless there's something very wrong going on. This wait sometimes 9 | times out on the testbot, this makes it infinite. 10 | --- 11 | dlls/user32/tests/msg.c | 2 +- 12 | 1 file changed, 1 insertion(+), 1 deletion(-) 13 | 14 | diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c 15 | index 11111111111..11111111111 100644 16 | --- a/dlls/user32/tests/msg.c 17 | +++ b/dlls/user32/tests/msg.c 18 | @@ -17945,7 +17945,7 @@ static void test_WaitForInputIdle( char *argv0 ) 19 | ok( ret, "CreateProcess '%s' failed err %lu.\n", path, GetLastError() ); 20 | if (ret) 21 | { 22 | - ret = WaitForSingleObject( start_event, 5000 ); 23 | + ret = WaitForSingleObject( start_event, INFINITE ); 24 | ok( ret == WAIT_OBJECT_0, "%u: WaitForSingleObject failed\n", i ); 25 | if (ret == WAIT_OBJECT_0) 26 | { 27 | -- 28 | 2.40.0 29 | 30 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0322-p0013-loader-Enable-all-remap-logic-by-default.patch: -------------------------------------------------------------------------------- 1 | From: Jinoh Kang 2 | Subject: [PATCH v5 13/13] loader: Enable all remap logic by default. 3 | Message-Id: <6ee41e7e-31ce-08ac-a177-53d793a1a69d@gmail.com> 4 | Date: Sat, 5 Mar 2022 23:55:01 +0900 5 | In-Reply-To: <7a3d3b9e-7d1a-9fde-99a7-bd47d51fda35@gmail.com> 6 | References: <7a3d3b9e-7d1a-9fde-99a7-bd47d51fda35@gmail.com> 7 | 8 | Signed-off-by: Jinoh Kang 9 | --- 10 | 11 | Notes: 12 | v4 -> v5: no changes 13 | 14 | loader/preloader.c | 6 +++--- 15 | 1 file changed, 3 insertions(+), 3 deletions(-) 16 | 17 | diff --git a/loader/preloader.c b/loader/preloader.c 18 | index 11111111111..11111111111 100644 19 | --- a/loader/preloader.c 20 | +++ b/loader/preloader.c 21 | @@ -291,11 +291,11 @@ enum remap_policy 22 | REMAP_POLICY_SKIP = 2, 23 | LAST_REMAP_POLICY, 24 | 25 | - REMAP_POLICY_DEFAULT_VDSO = REMAP_POLICY_SKIP, 26 | + REMAP_POLICY_DEFAULT_VDSO = REMAP_POLICY_ON_CONFLICT, 27 | #ifdef __arm__ 28 | - REMAP_POLICY_DEFAULT_SIGPAGE = REMAP_POLICY_SKIP, 29 | + REMAP_POLICY_DEFAULT_SIGPAGE = REMAP_POLICY_ON_CONFLICT, 30 | #endif 31 | - REMAP_POLICY_DEFAULT_STACK = REMAP_POLICY_SKIP, 32 | + REMAP_POLICY_DEFAULT_STACK = REMAP_POLICY_ON_CONFLICT, 33 | }; 34 | 35 | /* 36 | 37 | -- 38 | 2.40.0 39 | 40 | -------------------------------------------------------------------------------- /patches/0006-thread-priority/0003-server-Map-THREAD_PRIORITY_IDLE-to-SCHED_IDLE.patch: -------------------------------------------------------------------------------- 1 | From df72c4d301123c0ea0c33af4bc9d00c47255a664 Mon Sep 17 00:00:00 2001 2 | From: Torge Matthies 3 | Date: Thu, 26 Jan 2023 22:13:55 +0100 4 | Subject: [PATCH 3/3] server: Map THREAD_PRIORITY_IDLE to SCHED_IDLE. 5 | 6 | --- 7 | server/thread.c | 12 ++++++++++++ 8 | 1 file changed, 12 insertions(+) 9 | 10 | diff --git a/server/thread.c b/server/thread.c 11 | index 11111111111..11111111111 100644 12 | --- a/server/thread.c 13 | +++ b/server/thread.c 14 | @@ -888,6 +888,18 @@ int set_thread_priority( struct thread* thread, int priority_class, int priority 15 | } 16 | else 17 | { 18 | +#ifdef HAVE_SCHED_SETSCHEDULER 19 | + if (priority == THREAD_PRIORITY_IDLE) 20 | + { 21 | + struct sched_param param; 22 | + if (sched_getparam( thread->unix_tid, ¶m ) == 0) 23 | + { 24 | + param.sched_priority = 0; 25 | + if (sched_setscheduler( thread->unix_tid, SCHED_IDLE|SCHED_RESET_ON_FORK, ¶m ) == 0) 26 | + return 0; 27 | + } 28 | + } 29 | +#endif 30 | #ifdef HAVE_SETPRIORITY 31 | if (setpriority( PRIO_PROCESS, thread->unix_tid, 32 | get_unix_priority( priority_class, priority ) ) == 0) 33 | -- 34 | 2.40.0 35 | 36 | -------------------------------------------------------------------------------- /patches/0017-networking-and-browser/ps0034-p0001-include-Add-definition-for-GetBestRoute2.patch: -------------------------------------------------------------------------------- 1 | From: Jinoh Kang 2 | Subject: [PATCH 1/3] include: Add definition for GetBestRoute2. 3 | Message-Id: 4 | Date: Fri, 17 Jun 2022 14:00:13 +0000 5 | In-Reply-To: 6 | References: 7 | 8 | From: Jinoh Kang 9 | 10 | Signed-off-by: Jinoh Kang 11 | --- 12 | include/netioapi.h | 1 + 13 | 1 file changed, 1 insertion(+) 14 | 15 | diff --git a/include/netioapi.h b/include/netioapi.h 16 | index 11111111111..11111111111 100644 17 | --- a/include/netioapi.h 18 | +++ b/include/netioapi.h 19 | @@ -250,6 +250,7 @@ DWORD WINAPI ConvertInterfaceNameToLuidA(const char*,NET_LUID*); 20 | DWORD WINAPI ConvertInterfaceNameToLuidW(const WCHAR*,NET_LUID*); 21 | DWORD WINAPI ConvertLengthToIpv4Mask(ULONG,ULONG*); 22 | void WINAPI FreeMibTable(void*); 23 | +DWORD WINAPI GetBestRoute2(NET_LUID*,NET_IFINDEX,const SOCKADDR_INET*,const SOCKADDR_INET*,ULONG,PMIB_IPFORWARD_ROW2,SOCKADDR_INET*); 24 | DWORD WINAPI GetIfEntry2(MIB_IF_ROW2*); 25 | DWORD WINAPI GetIfEntry2Ex(MIB_IF_TABLE_LEVEL,MIB_IF_ROW2*); 26 | DWORD WINAPI GetIfTable2(MIB_IF_TABLE2**); 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0204-loader-Create-performance-winsat-datastore-on-pref.patch: -------------------------------------------------------------------------------- 1 | From: Fox2Code 2 | #Subject: [PATCH] loader: Create performance\winsat\datastore on prefix creation 3 | Message-Id: 4 | Date: Wed, 3 Nov 2021 23:12:33 +0100 5 | 6 |

7 | 8 | From 61a409fc5e793cf933eac57bcf72045e91f60604 Mon Sep 17 00:00:00 2001 9 | From: =?UTF-8?q?Lo=C3=AFc=20Rebmeister?= 10 | Date: Wed, 3 Nov 2021 23:06:31 +0100 11 | Subject: [PATCH] loader: Create performance\winsat\datastore on prefix 12 | creation 13 | MIME-Version: 1.0 14 | Content-Type: text/plain; charset=UTF-8 15 | Content-Transfer-Encoding: 8bit 16 | 17 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51968 18 | Signed-off-by: Loïc Rebmeister 19 | --- 20 | loader/wine.inf.in | 1 + 21 | 1 file changed, 1 insertion(+) 22 | 23 | diff --git a/loader/wine.inf.in b/loader/wine.inf.in 24 | index 11111111111..11111111111 100644 25 | --- a/loader/wine.inf.in 26 | +++ b/loader/wine.inf.in 27 | @@ -2487,6 +2487,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G" 28 | 10,performance\winsat\datastore, 29 | 10,tasks, 30 | 10,temp, 31 | +10,performance\winsat\datastore, 32 | 11,catroot, 33 | 11,mui, 34 | 11,tasks, 35 | 36 | -- 37 | 2.40.0 38 | 39 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0443-wineboot-Print-more-information-when-TSC-calibrati.patch: -------------------------------------------------------------------------------- 1 | From b5e31d1b0fb52bc06e947645aae6ee93c6730a60 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Thu, 28 Jul 2022 22:54:25 +0200 4 | Subject: [PATCH] wineboot: Print more information when TSC calibration fails. 5 | 6 | --- 7 | programs/wineboot/wineboot.c | 8 +++++++- 8 | 1 file changed, 7 insertions(+), 1 deletion(-) 9 | 10 | diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c 11 | index 11111111111..11111111111 100644 12 | --- a/programs/wineboot/wineboot.c 13 | +++ b/programs/wineboot/wineboot.c 14 | @@ -323,7 +323,13 @@ static UINT64 read_tsc_frequency( BOOL has_rdtscp ) 15 | } 16 | while (error > 500 && --retries); 17 | 18 | - if (!retries) WARN( "TSC frequency calibration failed, unstable TSC?\n" ); 19 | + if (!retries) 20 | + { 21 | + FIXME( "TSC frequency calibration failed, unstable TSC?"); 22 | + FIXME( "time0 %I64u ns, time1 %I64u ns\n", time0 * 100, time1 * 100 ); 23 | + FIXME( "tsc2 - tsc0 %I64u, tsc3 - tsc1 %I64u\n", tsc2 - tsc0, tsc3 - tsc1 ); 24 | + FIXME( "freq0 %I64u Hz, freq2 %I64u Hz, error %I64u ppm\n", freq0, freq1, error ); 25 | + } 26 | else 27 | { 28 | freq = (freq0 + freq1) / 2; 29 | -------------------------------------------------------------------------------- /patches/0012-window-input-and-control-handling/ps0117-winex11.drv-Don-t-call-XGetAtomName-if-the-result-.patch: -------------------------------------------------------------------------------- 1 | From 3a7df97a6b590627e3f59b4a9d1c414f6d980450 Mon Sep 17 00:00:00 2001 2 | From: Torge Matthies 3 | Date: Thu, 10 Nov 2022 18:45:55 +0100 4 | Subject: [PATCH] winex11.drv: Don't call XGetAtomName if the result is unused. 5 | 6 | --- 7 | dlls/winex11.drv/event.c | 10 ++++++---- 8 | 1 file changed, 6 insertions(+), 4 deletions(-) 9 | 10 | diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c 11 | index 11111111111..11111111111 100644 12 | --- a/dlls/winex11.drv/event.c 13 | +++ b/dlls/winex11.drv/event.c 14 | @@ -1590,10 +1590,12 @@ static BOOL X11DRV_PropertyNotify( HWND hwnd, XEvent *xev ) 15 | 16 | if (!hwnd) return FALSE; 17 | 18 | - name = XGetAtomName(event->display, event->atom); 19 | - if(name){ 20 | - TRACE("win %p PropertyNotify atom: %s, state: 0x%x\n", hwnd, name, event->state); 21 | - XFree(name); 22 | + if (TRACE_ON(event)) { 23 | + name = XGetAtomName(event->display, event->atom); 24 | + if(name){ 25 | + TRACE("win %p PropertyNotify atom: %s, state: 0x%x\n", hwnd, name, event->state); 26 | + XFree(name); 27 | + } 28 | } 29 | 30 | if (event->atom == x11drv_atom(WM_STATE)) handle_wm_state_notify( hwnd, event, TRUE ); 31 | -- 32 | 2.40.0 33 | 34 | -------------------------------------------------------------------------------- /patches/0012-window-input-and-control-handling/ps0033-win32u-Send-WM_NCCALCSIZE-message-when-a-new-windo.patch: -------------------------------------------------------------------------------- 1 | From: Haoyang Chen 2 | #Subject: [PATCH] win32u: Send WM_NCCALCSIZE message, when a new window is displayed. 3 | Message-Id: 4 | Date: Tue, 12 Jan 2021 10:14:33 +0800 5 | 6 | From 0ef95fe7663a0f35352d6ac1d66698de021b883e Mon Sep 17 00:00:00 2001 7 | From: Haoyang Chen 8 | Date: Mon, 11 Jan 2021 17:54:36 +0800 9 | Subject: [PATCH] win32u: Send WM_NCCALCSIZE message, when a new window is 10 | displayed. 11 | 12 | Signed-off-by: Haoyang Chen 13 | --- 14 | dlls/win32u/window.c | 3 +++ 15 | 1 file changed, 3 insertions(+) 16 | 17 | diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c 18 | index 11111111111..11111111111 100644 19 | --- a/dlls/win32u/window.c 20 | +++ b/dlls/win32u/window.c 21 | @@ -4485,6 +4485,9 @@ static BOOL show_window( HWND hwnd, INT cmd ) 22 | 23 | if (!(win = get_win_ptr( hwnd )) || win == WND_OTHER_PROCESS) goto done; 24 | 25 | + if (show_flag && !was_visible && ((style & (WS_CAPTION | WS_MAXIMIZE | WS_MAXIMIZE)) == WS_CAPTION)) 26 | + swp |= SWP_FRAMECHANGED; 27 | + 28 | if (win->flags & WIN_NEED_SIZE) 29 | { 30 | /* should happen only in CreateWindowEx() */ 31 | 32 | -- 33 | 2.40.0 34 | 35 | -------------------------------------------------------------------------------- /patches/0011-rbernon-patches/0000-reverts/0008-Revert-server-Clear-the-MOUSEEVENTF_-ABSOLUTE-VIRTUA.patch: -------------------------------------------------------------------------------- 1 | From f4ec87cb2b84e433559caf117ef4af2869d4198e Mon Sep 17 00:00:00 2001 2 | From: Torge Matthies 3 | Date: Mon, 25 Apr 2022 05:24:26 +0200 4 | Subject: [PATCH 08/16] Revert "server: Clear the 5 | MOUSEEVENTF_(ABSOLUTE|VIRTUALDESK) flags." 6 | 7 | This reverts staging patch patches/user32-rawinput-mouse-experimental/0001-server-Clear-the-MOUSEEVENTF_-ABSOLUTE-VIRTUALDESK-f.patch 8 | --- 9 | server/queue.c | 2 +- 10 | 1 file changed, 1 insertion(+), 1 deletion(-) 11 | 12 | diff --git a/server/queue.c b/server/queue.c 13 | index 11111111111..11111111111 100644 14 | --- a/server/queue.c 15 | +++ b/server/queue.c 16 | @@ -2059,7 +2059,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons 17 | msg_data = &raw_msg.data; 18 | msg_data->info = input->mouse.info; 19 | msg_data->size = sizeof(*msg_data); 20 | - msg_data->flags = flags & ~(MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_VIRTUALDESK); 21 | + msg_data->flags = flags; 22 | msg_data->rawinput.type = RIM_TYPEMOUSE; 23 | msg_data->rawinput.mouse.x = x - desktop->shared->cursor.x; 24 | msg_data->rawinput.mouse.y = y - desktop->shared->cursor.y; 25 | -- 26 | 2.40.0 27 | 28 | -------------------------------------------------------------------------------- /patches/0014-crypto/ps0005-crypt32-Hash-the-SubjectPublicKeyInfo-as-fallback-.patch: -------------------------------------------------------------------------------- 1 | From f4344af687c6ce782822c200938ae1481b0e496c Mon Sep 17 00:00:00 2001 2 | From: Torge Matthies 3 | Date: Sun, 14 Feb 2021 23:31:52 +0100 4 | Subject: [PATCH] crypt32: Hash the SubjectPublicKeyInfo as fallback for 5 | CERT_KEY_IDENTIFIER_PROP_ID. 6 | 7 | Signed-off-by: Torge Matthies 8 | --- 9 | dlls/crypt32/cert.c | 6 ++++++ 10 | 1 file changed, 6 insertions(+) 11 | 12 | diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c 13 | index 11111111111..11111111111 100644 14 | --- a/dlls/crypt32/cert.c 15 | +++ b/dlls/crypt32/cert.c 16 | @@ -601,6 +601,12 @@ static BOOL CertContext_GetProperty(cert_t *cert, DWORD dwPropId, 17 | CertContext_SetProperty(cert, dwPropId, 0, &value); 18 | } 19 | } 20 | + else if (cert->ctx.pCertInfo 21 | + && cert->ctx.pCertInfo->SubjectPublicKeyInfo.PublicKey.cbData 22 | + && cert->ctx.pCertInfo->SubjectPublicKeyInfo.PublicKey.pbData) 23 | + ret = CryptHashPublicKeyInfo(0, CALG_SHA1, 0, 24 | + X509_ASN_ENCODING, &cert->ctx.pCertInfo->SubjectPublicKeyInfo, 25 | + pvData, pcbData); 26 | else 27 | SetLastError(ERROR_INVALID_DATA); 28 | break; 29 | -- 30 | 2.40.0 31 | 32 | -------------------------------------------------------------------------------- /config/tmpfs.cfg: -------------------------------------------------------------------------------- 1 | #!/hint/bash 2 | # shellcheck disable=SC2034 3 | 4 | if ! [ "${_frogminer_build_tmpfs:-true}" = true ]; then 5 | return 6 | fi 7 | 8 | _frogminer_args_contains_install() { 9 | while [ $# -ne 0 ]; do 10 | [ "$1" = install ] && return 11 | shift 12 | done 13 | return 1 14 | } 15 | 16 | _make() ( 17 | if ! _frogminer_args_contains_install "$@"; then 18 | ( 19 | tmp_build_dir="$(mktemp -d)" || exit 20 | trap 'rm -rf "${tmp_build_dir:?}"' EXIT 21 | mkdir "$tmp_build_dir/build" 22 | cp -a -t "$tmp_build_dir/build" ./. || exit 23 | ln -s "$PWD"/../wine-mirror-git "$tmp_build_dir/wine-mirror-git" 24 | ( 25 | cd "$tmp_build_dir/build" || exit 26 | command "$@" 27 | ) 28 | ret=$? 29 | cp -a -t ./ "$tmp_build_dir/build"/. || : 30 | exit $ret 31 | ) 32 | else 33 | command "$@" 34 | fi 35 | ) 36 | 37 | make() { 38 | _make make "$@" 39 | } 40 | 41 | _frogminer_args_contains_make() { 42 | while [ $# -ne 0 ]; do 43 | [ "$1" = make ] && return 44 | shift 45 | done 46 | return 1 47 | } 48 | 49 | schedtool() { 50 | if _frogminer_args_contains_make "$@"; then 51 | _make schedtool "$@" 52 | else 53 | command schedtool "$@" 54 | fi 55 | } 56 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0441-p0002-ntdll-Add-5-byte-nop-to-start-of-KiUserCallb.patch: -------------------------------------------------------------------------------- 1 | From 0fc7201bd45a58cfb354dc0d52cacae27b49ecbb Mon Sep 17 00:00:00 2001 2 | From: Torge Matthies 3 | Date: Mon, 24 Oct 2022 19:30:25 +0200 4 | Subject: [PATCH 2/4] ntdll: Add 5-byte nop to start of 5 | KiUserCallbackDispatcher. 6 | 7 | Overwatch 2 hooks KiUserCallbackDispatcher by overwriting the first five bytes with a jump, and returning to 8 | just after the jump. Make sure there is a five-byte instruction for it to replace. 9 | 10 | Signed-off-by: Torge Matthies 11 | --- 12 | dlls/ntdll/signal_x86_64.c | 1 + 13 | 1 file changed, 1 insertion(+) 14 | 15 | diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c 16 | index 11111111111..11111111111 100644 17 | --- a/dlls/ntdll/signal_x86_64.c 18 | +++ b/dlls/ntdll/signal_x86_64.c 19 | @@ -701,6 +701,7 @@ void WINAPI user_callback_dispatcher( ULONG id, void *args, ULONG len ) 20 | * FIXME: not binary compatible 21 | */ 22 | __ASM_GLOBAL_FUNC( KiUserCallbackDispatcher, 23 | + ".byte 0x0f, 0x1f, 0x44, 0x00, 0x00\n\t" /* Overwatch 2 replaces the first 5 bytes with a jump */ 24 | "andq $0xFFFFFFFFFFFFFFF0, %rsp\n\t" 25 | __ASM_SEH(".seh_endprologue\n\t") 26 | "call " __ASM_NAME("user_callback_dispatcher") "\n\t" 27 | -- 28 | 2.40.0 29 | 30 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0470-p0003-mmdevapi-copy-ContainerID-from-audio-driver-.patch: -------------------------------------------------------------------------------- 1 | From 09d737c9139b30d00842c890a3c6df3b24f84ce2 Mon Sep 17 00:00:00 2001 2 | From: Claire Girka 3 | Date: Fri, 15 Jul 2022 22:09:57 +0200 4 | Subject: [PATCH 3/4] mmdevapi: copy ContainerID from audio driver if 5 | available. 6 | 7 | Some games with support for the haptic feedback and speaker features of the 8 | Sony DualSense controller select the controller's audio output by filtering on 9 | the ContainerId IMMDevice property to find one that matches the controller's 10 | HID's. 11 | --- 12 | dlls/mmdevapi/devenum.c | 2 ++ 13 | 1 file changed, 2 insertions(+) 14 | 15 | diff --git a/dlls/mmdevapi/devenum.c b/dlls/mmdevapi/devenum.c 16 | index 11111111111..11111111111 100644 17 | --- a/dlls/mmdevapi/devenum.c 18 | +++ b/dlls/mmdevapi/devenum.c 19 | @@ -391,6 +391,8 @@ static MMDevice *MMDevice_Create(WCHAR *name, GUID *id, EDataFlow flow, DWORD st 20 | MMDevice_SetPropValue(id, flow, (const PROPERTYKEY*)&DEVPKEY_DeviceInterface_FriendlyName, &pv); 21 | MMDevice_SetPropValue(id, flow, (const PROPERTYKEY*)&DEVPKEY_Device_DeviceDesc, &pv); 22 | 23 | + set_driver_prop_value(id, flow, (const PROPERTYKEY*)&DEVPKEY_Device_ContainerId); 24 | + 25 | pv.pwszVal = guidstr; 26 | MMDevice_SetPropValue(id, flow, &deviceinterface_key, &pv); 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /patches/0013-meta-files/ps0005-include-Add-new-fields-for-SYSTEM_PEFORMANCE_INFOR.patch: -------------------------------------------------------------------------------- 1 | From: Vijay Kiran Kamuju 2 | #Subject: [PATCH] include: Add new fields for SYSTEM_PEFORMANCE_INFORMATION 3 | Message-Id: 4 | Date: Fri, 26 Jun 2020 11:48:43 +0200 5 | 6 | Signed-off-by: Vijay Kiran Kamuju 7 | 8 | From 0dbde0f8fbf698b3417eb8d8d425a502f9f7f360 Mon Sep 17 00:00:00 2001 9 | From: Vijay Kiran Kamuju 10 | Date: Wed, 4 Mar 2020 21:18:40 +0100 11 | Subject: [PATCH] include: Add new fields for SYSTEM_PEFORMANCE_INFORMATION 12 | 13 | Signed-off-by: Vijay Kiran Kamuju 14 | --- 15 | include/winternl.h | 4 ++++ 16 | 1 file changed, 4 insertions(+) 17 | 18 | diff --git a/include/winternl.h b/include/winternl.h 19 | index 11111111111..11111111111 100644 20 | --- a/include/winternl.h 21 | +++ b/include/winternl.h 22 | @@ -2472,6 +2472,10 @@ typedef struct _SYSTEM_PERFORMANCE_INFORMATION { 23 | ULONG FirstLevelTbFills; 24 | ULONG SecondLevelTbFills; 25 | ULONG SystemCalls; 26 | + ULONGLONG CcTotalDirtyPages; 27 | + ULONGLONG CcDirtyPageThreshold; 28 | + LONGLONG ResidentAvailablePages; 29 | + ULONGLONG SharedCommittedPages; 30 | } SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION; 31 | 32 | /* System Information Class 0x03 */ 33 | -------------------------------------------------------------------------------- /patches/0013-meta-files/ps0013-makedep-Add-various-lib-.a-targets-to-make-all.patch: -------------------------------------------------------------------------------- 1 | From: Kevin Puetz 2 | Subject: [PATCH] makedep: Add various lib*.a targets to make all. 3 | Message-Id: <20220202192426.3670-1-PuetzKevinA@JohnDeere.com> 4 | Date: Wed, 2 Feb 2022 13:24:26 -0600 5 | 6 | Otherwise .c files with #pragma makedep implib will not be built 7 | 8 | -- 9 | 10 | I think that compilation should not need to occur during `make install`; 11 | it should just be copying files (and maybe stripping) files into DESTDIR, 12 | without any need to modify the build folder. 13 | 14 | assuming (of course) that `make all` was up-to-date beforehand. 15 | --- 16 | tools/makedep.c | 3 +++ 17 | 1 file changed, 3 insertions(+) 18 | 19 | diff --git a/tools/makedep.c b/tools/makedep.c 20 | index 11111111111..11111111111 100644 21 | --- a/tools/makedep.c 22 | +++ b/tools/makedep.c 23 | @@ -3436,8 +3436,11 @@ static void output_static_lib( struct makefile *make, unsigned int arch ) 24 | if (!arch) output_filenames_obj_dir( make, make->unixobj_files ); 25 | output( "\n" ); 26 | if (!make->extlib) 27 | + { 28 | + strarray_add( &make->all_targets, name ); 29 | add_install_rule( make, make->staticlib, arch, name, 30 | strmake( "d%s%s", arch_install_dirs[arch], make->staticlib )); 31 | + } 32 | } 33 | 34 | 35 | 36 | -- 37 | 2.40.0 38 | 39 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0073-winex11.drv-Add-missing-Vulkan-extensions.patch: -------------------------------------------------------------------------------- 1 | From: Giovanni Mascellani 2 | Subject: [PATCH] winex11.drv: Add missing Vulkan extensions. 3 | Message-Id: <20210210151734.3354128-1-gmascellani@codeweavers.com> 4 | Date: Wed, 10 Feb 2021 16:17:34 +0100 5 | 6 | They were flagged by validation layers as required: 7 | VK_EXT_direct_mode_display depends on VK_KHR_display and transitively 8 | on VK_KHR_surface. VK_KHR_external_fence_capabilities is required by 9 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES. 10 | 11 | Signed-off-by: Giovanni Mascellani 12 | --- 13 | dlls/winex11.drv/xrandr.c | 1 + 14 | 1 file changed, 1 insertion(+) 15 | 16 | diff --git a/dlls/winex11.drv/xrandr.c b/dlls/winex11.drv/xrandr.c 17 | index 11111111111..11111111111 100644 18 | --- a/dlls/winex11.drv/xrandr.c 19 | +++ b/dlls/winex11.drv/xrandr.c 20 | @@ -856,6 +856,7 @@ static BOOL get_gpu_properties_from_vulkan( struct gdi_gpu *gpu, const XRRProvid 21 | "VK_EXT_direct_mode_display", 22 | "VK_KHR_display", 23 | VK_KHR_SURFACE_EXTENSION_NAME, 24 | + "VK_KHR_external_fence_capabilities", 25 | }; 26 | const struct vulkan_funcs *vulkan_funcs = get_vulkan_driver( WINE_VULKAN_DRIVER_VERSION ); 27 | VkResult (*pvkGetRandROutputDisplayEXT)( VkPhysicalDevice, Display *, RROutput, VkDisplayKHR * ); 28 | 29 | -- 30 | 2.40.0 31 | 32 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0262-p0002-programs-winedbg-don-t-allocate-a-new-consol.patch: -------------------------------------------------------------------------------- 1 | From: Eric Pouech 2 | Subject: [PATCH 2/2] programs/winedbg: don't allocate a new console for debuggee (that's no longer needed) 3 | Message-Id: <163904857223.275877.16189346440771390039.stgit@euterpe> 4 | Date: Thu, 9 Dec 2021 12:16:12 +0100 5 | In-Reply-To: <163904783028.275877.17125857415122664280.stgit@euterpe> 6 | References: <163904783028.275877.17125857415122664280.stgit@euterpe> 7 | 8 | Signed-off-by: Eric Pouech 9 | 10 | --- 11 | programs/winedbg/tgt_active.c | 5 +---- 12 | 1 file changed, 1 insertion(+), 4 deletions(-) 13 | 14 | diff --git a/programs/winedbg/tgt_active.c b/programs/winedbg/tgt_active.c 15 | index 11111111111..11111111111 100644 16 | --- a/programs/winedbg/tgt_active.c 17 | +++ b/programs/winedbg/tgt_active.c 18 | @@ -612,10 +612,7 @@ static BOOL dbg_start_debuggee(LPSTR cmdLine) 19 | startup.wShowWindow = (current.dwFlags & STARTF_USESHOWWINDOW) ? 20 | current.wShowWindow : SW_SHOWNORMAL; 21 | 22 | - /* FIXME: shouldn't need the CREATE_NEW_CONSOLE, but as usual CUIs need it 23 | - * while GUIs don't 24 | - */ 25 | - flags = DEBUG_PROCESS | CREATE_NEW_CONSOLE; 26 | + flags = DEBUG_PROCESS; 27 | if (!DBG_IVAR(AlsoDebugProcChild)) flags |= DEBUG_ONLY_THIS_PROCESS; 28 | 29 | if (!CreateProcessA(NULL, cmdLine, NULL, NULL, FALSE, flags, 30 | 31 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0435-p0007-STAGING-server-Propagate-main-thread-schedul.patch: -------------------------------------------------------------------------------- 1 | From e59d96f59742a9074ae44576aa350764f50675dd Mon Sep 17 00:00:00 2001 2 | From: Torge Matthies 3 | Date: Fri, 20 Jan 2023 18:31:18 +0100 4 | Subject: [PATCH 7/7] STAGING: server: Propagate main thread scheduling priority to 5 | shm request threads. 6 | 7 | --- 8 | server/thread.c | 5 +++++ 9 | 1 file changed, 5 insertions(+) 10 | 11 | diff --git a/server/thread.c b/server/thread.c 12 | index 11111111111..11111111111 100644 13 | --- a/server/thread.c 14 | +++ b/server/thread.c 15 | @@ -603,6 +603,8 @@ struct thread *create_thread( int fd, struct process *process, const struct secu 16 | int request_pipe[2]; 17 | #ifdef __linux__ 18 | pthread_t pthread; 19 | + int policy; 20 | + struct sched_param param; 21 | #endif 22 | 23 | if (memory_barrier_obj) 24 | @@ -694,6 +696,9 @@ struct thread *create_thread( int fd, struct process *process, const struct secu 25 | release_object( thread ); 26 | return NULL; 27 | } 28 | + if (!pthread_getschedparam( pthread_self(), &policy, ¶m ) && (policy || param.sched_priority)) 29 | + if (pthread_setschedparam( pthread, policy | SCHED_RESET_ON_FORK, ¶m )) 30 | + pthread_setschedparam( pthread, policy, ¶m ); 31 | pthread_detach( pthread ); 32 | thread->request_shm_thread_running = 1; 33 | #endif 34 | -- 35 | 2.40.0 36 | 37 | -------------------------------------------------------------------------------- /patches/0017-networking-and-browser/ps0010-netprofm-set-ret-NULL-if-no-more-connections.patch: -------------------------------------------------------------------------------- 1 | From: "Alex Xu (Hello71)" 2 | Subject: [PATCH] netprofm: set *ret=NULL if no more connections 3 | Message-Id: <20210123225155.69567-1-alex_y_xu@yahoo.ca> 4 | Date: Sat, 23 Jan 2021 17:51:55 -0500 5 | References: <20210123225155.69567-1-alex_y_xu.ref@yahoo.ca> 6 | 7 | Qt 5.14+ tries to check network connection suitability when any network 8 | connection is made. Unfortunately, this is done incorrectly. The return 9 | value of IEnumNetworkConnections::Next is only checked for failure, not 10 | for S_FALSE. Instead, !*ret is used to quit the loop. 11 | 12 | Apparently, Windows puts NULL in the output in this case. It is possible 13 | that all of the non-populated slots are actually set to NULL, but Qt 14 | only uses count=1. To work around the issue, make Wine set NULL too. 15 | 16 | Signed-off-by: Alex Xu (Hello71) 17 | --- 18 | dlls/netprofm/list.c | 1 + 19 | 1 file changed, 1 insertion(+) 20 | 21 | diff --git a/dlls/netprofm/list.c b/dlls/netprofm/list.c 22 | index 11111111111..11111111111 100644 23 | --- a/dlls/netprofm/list.c 24 | +++ b/dlls/netprofm/list.c 25 | @@ -1030,6 +1030,7 @@ static HRESULT WINAPI connections_enum_Next( 26 | i++; 27 | } 28 | if (fetched) *fetched = i; 29 | + if (!i) ret[0] = NULL; 30 | 31 | return i < count ? S_FALSE : S_OK; 32 | } 33 | 34 | -- 35 | 2.40.0 36 | 37 | -------------------------------------------------------------------------------- /patches/0010-shared-memory/0042-win32u-Use-input-shared-memory-in-NtUserGetKeyboardS.patch: -------------------------------------------------------------------------------- 1 | From 883ca3744ca413973955dd569dc0012c4ba8c673 Mon Sep 17 00:00:00 2001 2 | From: Torge Matthies 3 | Date: Mon, 28 Mar 2022 06:41:24 +0200 4 | Subject: [PATCH 42/44] win32u: Use input shared memory in 5 | NtUserGetKeyboardState. 6 | 7 | Almost entirely copied from a commit by Rémi Bernon. 8 | --- 9 | dlls/win32u/input.c | 12 ++++++++++++ 10 | 1 file changed, 12 insertions(+) 11 | 12 | diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c 13 | index 11111111111..11111111111 100644 14 | --- a/dlls/win32u/input.c 15 | +++ b/dlls/win32u/input.c 16 | @@ -938,11 +938,23 @@ SHORT WINAPI NtUserGetKeyState( INT vkey ) 17 | */ 18 | BOOL WINAPI NtUserGetKeyboardState( BYTE *state ) 19 | { 20 | + volatile struct input_shared_memory *shared = get_input_shared_memory(); 21 | + BOOL skip = TRUE; 22 | BOOL ret; 23 | UINT i; 24 | 25 | TRACE("(%p)\n", state); 26 | 27 | + if (!shared) skip = FALSE; 28 | + else SHARED_READ_BEGIN( &shared->seq ) 29 | + { 30 | + if (!shared->created) skip = FALSE; /* server needs to create the queue */ 31 | + else memcpy( state, (const void *)shared->keystate, 256 ); 32 | + } 33 | + SHARED_READ_END( &shared->seq ); 34 | + 35 | + if (skip) return TRUE; 36 | + 37 | memset( state, 0, 256 ); 38 | SERVER_START_REQ( get_key_state ) 39 | { 40 | -- 41 | 2.40.0 42 | 43 | -------------------------------------------------------------------------------- /patches/0012-window-input-and-control-handling/ps0015-comdlg32-Fix-the-wrong-popup-when-saving-the-same-.patch: -------------------------------------------------------------------------------- 1 | From: "Jiangyi Chen" 2 | #Subject: [PATCH v3] comdlg32: Fix the wrong popup when saving the same file again in the same directory. 3 | Message-Id: <1b751b8d.451d.174768cc5cf.Coremail.cjy520lcy@163.com> 4 | Date: Thu, 10 Sep 2020 13:46:11 +0800 (CST) 5 | 6 | From bb30355690365aa4621f5a15331619439e61dd11 Mon Sep 17 00:00:00 2001 7 | From: Jiangyi Chen 8 | Date: Wed, 9 Sep 2020 08:01:59 +0000 9 | Subject: [PATCH v3] comdlg32: Fix the wrong popup when saving the same file 10 | again in the same directory. 11 | 12 | Signed-off-by: Jiangyi Chen 13 | --- 14 | dlls/comdlg32/itemdlg.c | 2 +- 15 | 1 file changed, 1 insertion(+), 1 deletion(-) 16 | 17 | diff --git a/dlls/comdlg32/itemdlg.c b/dlls/comdlg32/itemdlg.c 18 | index 11111111111..11111111111 100644 19 | --- a/dlls/comdlg32/itemdlg.c 20 | +++ b/dlls/comdlg32/itemdlg.c 21 | @@ -645,7 +645,7 @@ static HRESULT on_default_action(FileDialogImpl *This) 22 | if(FAILED(hr)) 23 | break; 24 | 25 | - if(This->options & FOS_PICKFOLDERS) 26 | + if((This->options & FOS_PICKFOLDERS) && This->dlg_type != ITEMDLG_TYPE_SAVE) 27 | { 28 | SFGAOF attributes; 29 | hr = IShellItemArray_GetAttributes(This->psia_results, SIATTRIBFLAGS_AND, SFGAO_FOLDER, &attributes); 30 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0460-ntdll-unix-Init-the-trap-handler.patch: -------------------------------------------------------------------------------- 1 | From fe04347d25162a1c8e3992800d74a52321f63c0f Mon Sep 17 00:00:00 2001 2 | From: Eric Pouech 3 | Date: Fri, 10 Feb 2023 18:15:49 +0100 4 | Subject: [PATCH] ntdll/unix: Init the trap handler. 5 | 6 | Otherwise we get nested exceptions on linux on any breakpoint in 7 | a multi-arch wow64 (AMD64) configuration, running a 32bit debuggee. 8 | 9 | With this patch, winetest kernel32:debugger runs to the end (it times 10 | out without), yet spitting a couple of failures (that don't exist in 11 | old wow64 configuration). 12 | 13 | Signed-off-by: Eric Pouech 14 | --- 15 | dlls/ntdll/unix/signal_x86_64.c | 5 ++++- 16 | 1 file changed, 4 insertions(+), 1 deletion(-) 17 | 18 | diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c 19 | index 11111111111..11111111111 100644 20 | --- a/dlls/ntdll/unix/signal_x86_64.c 21 | +++ b/dlls/ntdll/unix/signal_x86_64.c 22 | @@ -2139,7 +2139,10 @@ static BOOL handle_syscall_fault( ucontext_t *sigcontext, EXCEPTION_RECORD *rec, 23 | */ 24 | static BOOL handle_syscall_trap( ucontext_t *sigcontext ) 25 | { 26 | - struct syscall_frame *frame = amd64_thread_data()->syscall_frame; 27 | + struct syscall_frame *frame; 28 | + 29 | + init_handler( sigcontext ); 30 | + frame = amd64_thread_data()->syscall_frame; 31 | 32 | /* disallow single-stepping through a syscall */ 33 | 34 | -- 35 | 2.40.0 36 | 37 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0470-p0002-mmdevapi-decode-ContainerId-property-to-CLSI.patch: -------------------------------------------------------------------------------- 1 | From aeaa888230d529f5d22c77bed9921c5d7c2fd7c7 Mon Sep 17 00:00:00 2001 2 | From: Claire Girka 3 | Date: Fri, 15 Jul 2022 22:09:57 +0200 4 | Subject: [PATCH 2/4] mmdevapi: decode ContainerId property to CLSID in 5 | MMDevice_GetPropValue. 6 | 7 | --- 8 | dlls/mmdevapi/devenum.c | 15 +++++++++++++++ 9 | 1 file changed, 15 insertions(+) 10 | 11 | diff --git a/dlls/mmdevapi/devenum.c b/dlls/mmdevapi/devenum.c 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/mmdevapi/devenum.c 14 | +++ b/dlls/mmdevapi/devenum.c 15 | @@ -189,6 +189,21 @@ static HRESULT MMDevice_GetPropValue(const GUID *devguid, DWORD flow, REFPROPERT 16 | break; 17 | } 18 | RegCloseKey(regkey); 19 | + 20 | + /* Special case ContainerID as CLSID */ 21 | + if(pv->vt == VT_BLOB && pv->blob.pBlobData && pv->blob.cbSize == 24 && pv->blob.pBlobData[0] == VT_CLSID && IsEqualPropertyKey(*key, DEVPKEY_Device_ContainerId)) { 22 | + GUID *guid = CoTaskMemAlloc(sizeof(GUID)); 23 | + if (!guid) { 24 | + PropVariantClear(pv); 25 | + hr = E_OUTOFMEMORY; 26 | + } else { 27 | + memcpy(guid, pv->blob.pBlobData + 8, sizeof(GUID)); 28 | + CoTaskMemFree(pv->blob.pBlobData); 29 | + pv->vt = VT_CLSID; 30 | + pv->puuid = guid; 31 | + } 32 | + } 33 | + 34 | return hr; 35 | } 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0022-p0002-kernel32-tests-Add-mutex-tests-with-8-bit-ch.patch: -------------------------------------------------------------------------------- 1 | From: Akihiro Sagawa 2 | Subject: [PATCH v2 2/2] kernel32/tests: Add mutex tests with 8-bit character string. 3 | Message-Id: <20200520214354.884C.375B48EC@gmail.com> 4 | Date: Wed, 20 May 2020 21:47:10 +0900 5 | 6 | 7 | v2: Simplify the tests and swap the patche order. 8 | 9 | We should be able to open the mutex with the same name after creation. 10 | 11 | Signed-off-by: Akihiro Sagawa 12 | --- 13 | dlls/kernel32/tests/sync.c | 11 +++++++++++ 14 | 1 file changed, 11 insertions(+) 15 | 16 | diff --git a/dlls/kernel32/tests/sync.c b/dlls/kernel32/tests/sync.c 17 | index 11111111111..11111111111 100644 18 | --- a/dlls/kernel32/tests/sync.c 19 | +++ b/dlls/kernel32/tests/sync.c 20 | @@ -356,6 +356,17 @@ todo_wine_if(getenv("WINEESYNC")) /* XFAIL: due to the above */ 21 | 22 | CloseHandle(hCreated); 23 | 24 | + /* Test 8-bit character string */ 25 | + 26 | + hCreated = CreateMutexA(NULL, FALSE, "abcd\xef"); 27 | + ok(hCreated != NULL, "CreateMutex failed with error %d\n", GetLastError()); 28 | + 29 | + hOpened = OpenMutexA(SYNCHRONIZE, FALSE, "abcd\xef"); 30 | + ok(hOpened != NULL, "OpenMutexA failed with error %d\n", GetLastError()); 31 | + CloseHandle(hOpened); 32 | + 33 | + CloseHandle(hCreated); 34 | + 35 | mutex = CreateMutexA( NULL, FALSE, NULL ); 36 | ok(!!mutex, "got error %lu\n", GetLastError()); 37 | 38 | -------------------------------------------------------------------------------- /patches/0005-reflink/0004-lmshare.h-define-STYPE_TEMPORARY.patch: -------------------------------------------------------------------------------- 1 | From: "Alex Xu (Hello71)" 2 | Subject: [PATCH v3 4/5] lmshare.h: define STYPE_TEMPORARY 3 | Message-Id: <20220127215056.243525-5-alex_y_xu@yahoo.ca> 4 | Date: Thu, 27 Jan 2022 16:50:55 -0500 5 | In-Reply-To: <20220127215056.243525-1-alex_y_xu@yahoo.ca> 6 | References: <20220127215056.243525-1-alex_y_xu@yahoo.ca> 7 | 8 | --- 9 | include/lmshare.h | 11 ++++++----- 10 | 1 file changed, 6 insertions(+), 5 deletions(-) 11 | 12 | diff --git a/include/lmshare.h b/include/lmshare.h 13 | index 11111111111..11111111111 100644 14 | --- a/include/lmshare.h 15 | +++ b/include/lmshare.h 16 | @@ -68,11 +68,12 @@ NET_API_STATUS WINAPI NetShareEnumSticky(LMSTR,DWORD,LPBYTE*,DWORD,LPDWORD,LPDWO 17 | NET_API_STATUS WINAPI NetShareGetInfo(LMSTR,LMSTR,DWORD,LPBYTE*); 18 | NET_API_STATUS WINAPI NetShareSetInfo(LMSTR,LMSTR,DWORD,LPBYTE,LPDWORD); 19 | 20 | -#define STYPE_DISKTREE 0 21 | -#define STYPE_PRINTQ 1 22 | -#define STYPE_DEVICE 2 23 | -#define STYPE_IPC 3 24 | -#define STYPE_SPECIAL 0x80000000 25 | +#define STYPE_DISKTREE 0 26 | +#define STYPE_PRINTQ 1 27 | +#define STYPE_DEVICE 2 28 | +#define STYPE_IPC 3 29 | +#define STYPE_TEMPORARY 0x40000000 30 | +#define STYPE_SPECIAL 0x80000000 31 | 32 | NET_API_STATUS WINAPI NetSessionDel(LMSTR,LMSTR,LMSTR); 33 | NET_API_STATUS WINAPI NetSessionEnum(LMSTR,LMSTR,LMSTR,DWORD,LPBYTE*,DWORD,LPDWORD,LPDWORD,LPDWORD); 34 | 35 | -- 36 | 2.40.0 37 | 38 | -------------------------------------------------------------------------------- /patches/0011-rbernon-patches/0000-reverts/0007-Revert-user32-Add-support-for-absolute-rawinput-mess.patch: -------------------------------------------------------------------------------- 1 | From 8104d603977b4b4ef33e9c613a0b7c2b8aa762c7 Mon Sep 17 00:00:00 2001 2 | From: Torge Matthies 3 | Date: Mon, 25 Apr 2022 05:24:26 +0200 4 | Subject: [PATCH 07/16] Revert "user32: Add support for absolute rawinput 5 | messages." 6 | 7 | This reverts staging patch patches/user32-rawinput-mouse-experimental/0002-user32-Add-support-for-absolute-rawinput-messages.patch 8 | --- 9 | dlls/win32u/rawinput.c | 3 +-- 10 | 1 file changed, 1 insertion(+), 2 deletions(-) 11 | 12 | diff --git a/dlls/win32u/rawinput.c b/dlls/win32u/rawinput.c 13 | index 11111111111..11111111111 100644 14 | --- a/dlls/win32u/rawinput.c 15 | +++ b/dlls/win32u/rawinput.c 16 | @@ -96,8 +96,7 @@ static bool rawinput_from_hardware_message( RAWINPUT *rawinput, const struct har 17 | rawinput->header.hDevice = WINE_MOUSE_HANDLE; 18 | rawinput->header.wParam = 0; 19 | 20 | - rawinput->data.mouse.usFlags = msg_data->flags & MOUSEEVENTF_ABSOLUTE ? MOUSE_MOVE_ABSOLUTE : MOUSE_MOVE_RELATIVE; 21 | - if (msg_data->flags & MOUSEEVENTF_VIRTUALDESK) rawinput->data.mouse.usFlags |= MOUSE_VIRTUAL_DESKTOP; 22 | + rawinput->data.mouse.usFlags = MOUSE_MOVE_RELATIVE; 23 | rawinput->data.mouse.usButtonFlags = 0; 24 | rawinput->data.mouse.usButtonData = 0; 25 | for (i = 1; i < ARRAY_SIZE(button_flags); ++i) 26 | -- 27 | 2.40.0 28 | 29 | -------------------------------------------------------------------------------- /patches/0012-window-input-and-control-handling/ps0008-p0001-comctl32-Don-t-redraw-the-Combo-Box-when-dro.patch: -------------------------------------------------------------------------------- 1 | From: "Gabriel Ivăncescu" 2 | Subject: [PATCH resend 1/2] comctl32: Don't redraw the Combo Box when dropped down if it has an editbox. 3 | Message-Id: <6508e5f7d1bba3e86c98d9fbe329450a7725d4f7.1606394081.git.gabrielopcode@gmail.com> 4 | Date: Thu, 26 Nov 2020 14:35:38 +0200 5 | 6 | Some applications subclass the combo box and handle WM_ERASEBKGND themselves, 7 | without using WS_CLIPCHILDREN. This causes them to erase over the editbox 8 | child. There's no reason to redraw it in this case since the editbox is 9 | supposed to cover it, anyway. 10 | 11 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22260 12 | Signed-off-by: Gabriel Ivăncescu 13 | --- 14 | dlls/comctl32/combo.c | 2 +- 15 | 1 file changed, 1 insertion(+), 1 deletion(-) 16 | 17 | diff --git a/dlls/comctl32/combo.c b/dlls/comctl32/combo.c 18 | index 11111111111..11111111111 100644 19 | --- a/dlls/comctl32/combo.c 20 | +++ b/dlls/comctl32/combo.c 21 | @@ -1001,7 +1001,7 @@ static void CBDropDown( LPHEADCOMBO lphc ) 22 | SWP_NOACTIVATE | SWP_SHOWWINDOW ); 23 | 24 | 25 | - if( !(lphc->wState & CBF_NOREDRAW) ) 26 | + if( !(lphc->wState & (CBF_NOREDRAW | CBF_EDIT)) ) 27 | RedrawWindow( lphc->self, NULL, 0, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW ); 28 | 29 | EnableWindow( lphc->hWndLBox, TRUE ); 30 | 31 | -- 32 | 2.40.0 33 | 34 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0044-conhost-Add-the-case-where-the-divisor-is-0.patch: -------------------------------------------------------------------------------- 1 | From: Pengpeng Dong 2 | #Subject: [PATCH v2] conhost: Add the case where the divisor is 0. 3 | Message-Id: <114182b4-27de-fa07-2945-0c2838eb437d@uniontech.com> 4 | Date: Wed, 23 Sep 2020 09:33:19 +0800 5 | 6 | From 9005ebd81c317606f0c31abf35d4e1b26f012246 Mon Sep 17 00:00:00 2001 7 | From: Pengpeng Dong 8 | Date: Wed, 23 Sep 2020 09:24:44 +0800 9 | Subject: [PATCH v2] conhost: Add the case where the divisor is 0. 10 | 11 | Signed-off-by: Pengpeng Dong 12 | --- 13 | programs/conhost/conhost.c | 5 ++++- 14 | 1 file changed, 4 insertions(+), 1 deletion(-) 15 | 16 | diff --git a/programs/conhost/conhost.c b/programs/conhost/conhost.c 17 | index 11111111111..11111111111 100644 18 | --- a/programs/conhost/conhost.c 19 | +++ b/programs/conhost/conhost.c 20 | @@ -2215,7 +2215,10 @@ static NTSTATUS write_output( struct screen_buffer *screen_buffer, const struct 21 | region->Left = x; 22 | region->Top = y; 23 | region->Right = min( x + width, screen_buffer->width ) - 1; 24 | - region->Bottom = min( y + entry_cnt / width, screen_buffer->height ) - 1; 25 | + if (width) 26 | + region->Bottom = min( y + entry_cnt / width, screen_buffer->height ) - 1; 27 | + else 28 | + return STATUS_INVALID_PARAMETER; 29 | } 30 | else 31 | { 32 | 33 | -- 34 | 2.40.0 35 | 36 | -------------------------------------------------------------------------------- /patches/0011-rbernon-patches/9989-misc/ps0088-p0001-user32-Update-rawinput-device-list-in-WM_DEV.patch: -------------------------------------------------------------------------------- 1 | From 5e6017e3455a37700867c20f4a6ad3ebd85e397f Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Thu, 23 Dec 2021 14:14:59 +0100 4 | Subject: [PATCH 1/9] user32: Update rawinput device list in WM_DEVICECHANGE 5 | callback. 6 | 7 | The SDL library calls GetRawInputDeviceList quickly after it has 8 | detected a new device, from a WM_DEVICECHANGE notification. 9 | 10 | It uses rawinput device information to find out whether it is an XInput 11 | device, when its name contains "IG_", or if the device should be opened 12 | through DInput. 13 | 14 | If the device is missing from the rawinput list, it considers it as a 15 | DInput device, and may end up with the same device used twice. 16 | --- 17 | dlls/user32/input.c | 1 + 18 | 1 file changed, 1 insertion(+) 19 | 20 | diff --git a/dlls/user32/input.c b/dlls/user32/input.c 21 | index 11111111111..11111111111 100644 22 | --- a/dlls/user32/input.c 23 | +++ b/dlls/user32/input.c 24 | @@ -521,6 +521,7 @@ BOOL WINAPI UnloadKeyboardLayout( HKL layout ) 25 | 26 | static DWORD CALLBACK devnotify_window_callbackW(HANDLE handle, DWORD flags, DEV_BROADCAST_HDR *header) 27 | { 28 | + NtUserGetRawInputDeviceInfo((HANDLE)-1, (UINT)-1, NULL, (void*)1); 29 | SendMessageTimeoutW(handle, WM_DEVICECHANGE, flags, (LPARAM)header, SMTO_ABORTIFHUNG, 2000, NULL); 30 | return 0; 31 | } 32 | -- 33 | 2.40.0 34 | 35 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0387-p0002-ntdll-Make-server_select-a-memory-barrier.patch: -------------------------------------------------------------------------------- 1 | From 1c2c89b95206e6fec4d85bae849467fecf72a386 Mon Sep 17 00:00:00 2001 2 | From: Torge Matthies 3 | Date: Wed, 7 Sep 2022 16:10:53 +0200 4 | Subject: [PATCH 2/5] ntdll: Make server_select a memory barrier. 5 | 6 | --- 7 | dlls/ntdll/unix/server.c | 3 +++ 8 | server/thread.c | 2 +- 9 | 2 files changed, 4 insertions(+), 1 deletion(-) 10 | 11 | diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/ntdll/unix/server.c 14 | +++ b/dlls/ntdll/unix/server.c 15 | @@ -696,6 +696,9 @@ unsigned int server_select( const select_op_t *select_op, data_size_t size, UINT 16 | sigset_t old_set; 17 | int signaled; 18 | 19 | + /* ensure writes so far are visible to other threads */ 20 | + MemoryBarrier(); 21 | + 22 | memset( &result, 0, sizeof(result) ); 23 | 24 | do 25 | diff --git a/server/thread.c b/server/thread.c 26 | index 11111111111..11111111111 100644 27 | --- a/server/thread.c 28 | +++ b/server/thread.c 29 | @@ -2606,7 +2606,7 @@ DECL_HANDLER(flush_process_write_buffers) 30 | struct thread_apc *apc; 31 | int success; 32 | 33 | - if (thread == current || thread->state == TERMINATED) continue; 34 | + if (thread == current || thread->state == TERMINATED || thread->wait) continue; 35 | 36 | if (!(apc = create_apc( ¤t->obj, &call ))) break; 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0034-ntdll-Add-SIGQUIT-to-server-block-set.patch: -------------------------------------------------------------------------------- 1 | From: Paul Gofman 2 | Subject: [PATCH] ntdll: Add SIGQUIT to server block set. 3 | Message-Id: <20200910234104.1216168-1-pgofman@codeweavers.com> 4 | Date: Fri, 11 Sep 2020 02:41:04 +0300 5 | 6 | Receiving SIGQUIT for forced thread termination may leave sync 7 | objects (like virtual_mutex) locked. 8 | 9 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49532 10 | Signed-off-by: Paul Gofman 11 | --- 12 | While the issue I observed in the referenced bug (happening during the process termination only) 13 | can be solved in different ways, I suppose protecting the locks from SIGQUIT is preferred 14 | because the thread can also be aborted the same way with NtTerminateThread apart from the 15 | whole process tear down. 16 | 17 | dlls/ntdll/unix/server.c | 1 + 18 | 1 file changed, 1 insertion(+) 19 | 20 | diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c 21 | index 11111111111..11111111111 100644 22 | --- a/dlls/ntdll/unix/server.c 23 | +++ b/dlls/ntdll/unix/server.c 24 | @@ -1578,6 +1578,7 @@ size_t server_init_process(void) 25 | sigaddset( &server_block_set, SIGUSR1 ); 26 | sigaddset( &server_block_set, SIGUSR2 ); 27 | sigaddset( &server_block_set, SIGCHLD ); 28 | + sigaddset( &server_block_set, SIGQUIT ); 29 | pthread_sigmask( SIG_BLOCK, &server_block_set, NULL ); 30 | 31 | /* receive the first thread request fd on the main socket */ 32 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0174-p0005-ntoskrnl.exe-Make-user-shared-data-pointers-.patch: -------------------------------------------------------------------------------- 1 | From: "Rémi Bernon" 2 | Subject: [PATCH 5/5] ntoskrnl.exe: Make user shared data pointers volatile (GCC 11). 3 | Message-Id: <20210927085833.544992-5-rbernon@codeweavers.com> 4 | Date: Mon, 27 Sep 2021 10:58:33 +0200 5 | In-Reply-To: <20210927085833.544992-1-rbernon@codeweavers.com> 6 | References: <20210927085833.544992-1-rbernon@codeweavers.com> 7 | 8 | So that GCC 11 stops warning about reading from a 0-size memory region. 9 | 10 | Signed-off-by: Rémi Bernon 11 | --- 12 | dlls/ntoskrnl.exe/instr.c | 4 ++-- 13 | 1 file changed, 2 insertions(+), 2 deletions(-) 14 | 15 | diff --git a/dlls/ntoskrnl.exe/instr.c b/dlls/ntoskrnl.exe/instr.c 16 | index 11111111111..11111111111 100644 17 | --- a/dlls/ntoskrnl.exe/instr.c 18 | +++ b/dlls/ntoskrnl.exe/instr.c 19 | @@ -497,8 +497,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(int); 20 | #define SIB_BASE( sib, rex ) (((sib) & 7) | (((rex) & REX_B) ? 8 : 0)) 21 | 22 | /* keep in sync with dlls/ntdll/thread.c:thread_init */ 23 | -static const BYTE *wine_user_shared_data = (BYTE *)0x7ffe0000; 24 | -static const BYTE *user_shared_data = (BYTE *)0xfffff78000000000; 25 | +static const BYTE *const volatile wine_user_shared_data = (BYTE *)0x7ffe0000; 26 | +static const BYTE *const volatile user_shared_data = (BYTE *)0xfffff78000000000; 27 | 28 | static inline DWORD64 *get_int_reg( CONTEXT *context, int index ) 29 | { 30 | 31 | -- 32 | 2.40.0 33 | 34 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0079-shell32-Use-CP_UTF8-in-__SHCloneStrAtoW.-Fix-probl.patch: -------------------------------------------------------------------------------- 1 | From: "Jiangyi Chen" 2 | #Subject: [PATCH] shell32: Use CP_UTF8 in __SHCloneStrAtoW. 3 | Message-Id: <26bf0c42.3726.178151abb94.Coremail.cjy520lcy@163.com> 4 | Date: Tue, 9 Mar 2021 11:49:36 +0800 (CST) 5 | 6 | From 55b69cbacc40a684b6abafee155aa8fa63218433 Mon Sep 17 00:00:00 2001 7 | From: Jiangyi Chen 8 | Date: Tue, 9 Mar 2021 11:46:53 +0800 9 | Subject: [PATCH] shell32: Use CP_UTF8 in __SHCloneStrAtoW. Fix problem that 10 | some paths cannot be opened by ShellExecuteA or ShellExecuteExA. 11 | 12 | Signed-off-by: Jiangyi Chen 13 | --- 14 | dlls/shell32/shell32_main.h | 4 ++-- 15 | 1 file changed, 2 insertions(+), 2 deletions(-) 16 | 17 | diff --git a/dlls/shell32/shell32_main.h b/dlls/shell32/shell32_main.h 18 | index 11111111111..11111111111 100644 19 | --- a/dlls/shell32/shell32_main.h 20 | +++ b/dlls/shell32/shell32_main.h 21 | @@ -172,9 +172,9 @@ static inline BOOL SHELL_OsIsUnicode(void) 22 | 23 | static inline WCHAR * __SHCloneStrAtoW(WCHAR ** target, const char * source) 24 | { 25 | - int len = MultiByteToWideChar(CP_ACP, 0, source, -1, NULL, 0); 26 | + int len = MultiByteToWideChar(CP_UTF8, 0, source, -1, NULL, 0); 27 | *target = SHAlloc(len*sizeof(WCHAR)); 28 | - MultiByteToWideChar(CP_ACP, 0, source, -1, *target, len); 29 | + MultiByteToWideChar(CP_UTF8, 0, source, -1, *target, len); 30 | return *target; 31 | } 32 | 33 | 34 | -- 35 | 2.40.0 36 | 37 | -------------------------------------------------------------------------------- /patches/0012-window-input-and-control-handling/ps0101-winex11.drv-Change-fullscreen-state-even-when-proc.patch: -------------------------------------------------------------------------------- 1 | From: Esme Povirk 2 | Subject: [PATCH] winex11.drv: Change fullscreen state even when processing events. 3 | Message-Id: <20220208215747.3628908-1-esme@codeweavers.com> 4 | Date: Tue, 8 Feb 2022 15:57:47 -0600 5 | 6 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52532 7 | Signed-off-by: Esme Povirk 8 | --- 9 | dlls/winex11.drv/window.c | 4 +++- 10 | 1 file changed, 3 insertions(+), 1 deletion(-) 11 | 12 | diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c 13 | index 11111111111..11111111111 100644 14 | --- a/dlls/winex11.drv/window.c 15 | +++ b/dlls/winex11.drv/window.c 16 | @@ -3044,7 +3044,9 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags, 17 | else 18 | { 19 | if (swp_flags & (SWP_FRAMECHANGED|SWP_STATECHANGED)) set_wm_hints( data ); 20 | - if (!event_type || event_type == PropertyNotify) 21 | + if (!event_type || event_type == PropertyNotify || 22 | + (((swp_flags & (SWP_NOMOVE|SWP_NOSIZE)) != (SWP_NOMOVE|SWP_NOSIZE)) && 23 | + (NtUserIsWindowRectFullScreen( &old_whole_rect ) != NtUserIsWindowRectFullScreen( &data->whole_rect )))) 24 | { 25 | update_net_wm_states( data ); 26 | if (!prev_window && insert_after && data->net_wm_state & (1 << NET_WM_STATE_FULLSCREEN)) 27 | 28 | -- 29 | 2.40.0 30 | 31 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0312-p0001-wdscore-Fix-spec-entries.patch: -------------------------------------------------------------------------------- 1 | From: Mohamad Al-Jaf 2 | Subject: [PATCH v11 1/8] wdscore: Fix spec entries. 3 | Message-Id: <20220412030023.405531-1-mohamadaljaf@gmail.com> 4 | Date: Mon, 11 Apr 2022 23:00:16 -0400 5 | 6 | Signed-off-by: Mohamad Al-Jaf 7 | --- 8 | dlls/wdscore/wdscore.spec | 8 ++++---- 9 | 1 file changed, 4 insertions(+), 4 deletions(-) 10 | 11 | diff --git a/dlls/wdscore/wdscore.spec b/dlls/wdscore/wdscore.spec 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/wdscore/wdscore.spec 14 | +++ b/dlls/wdscore/wdscore.spec 15 | @@ -116,7 +116,7 @@ 16 | @ stub WdsGetBlackboardValue 17 | @ stub WdsGetCurrentExecutionGroup 18 | @ stub WdsGetSetupLog 19 | -@ stub WdsTempDir 20 | +@ stub WdsGetTempDir 21 | @ stub WdsInitialize 22 | @ stub WdsInitializeCallbackArray 23 | @ stub WdsInitializeDataBinary 24 | @@ -139,7 +139,7 @@ 25 | @ stub WdsPackCollection 26 | @ stub WdsPublish 27 | @ stub WdsPublishEx 28 | -@ stub WdsPublishImmediateAsynch 29 | +@ stub WdsPublishImmediateAsync 30 | @ stub WdsPublishImmediateEx 31 | @ stub WdsPublishOffline 32 | @ stub WdsSeqAlloc 33 | @@ -150,8 +150,8 @@ 34 | @ stub WdsSetUILanguage 35 | @ stub WdsSetupLogDestroy 36 | @ stub WdsSetupLogInit 37 | -@ stub WdsSetLogMessageA 38 | -@ stub WdsSetLogMessageW 39 | +@ stub WdsSetupLogMessageA 40 | +@ stub WdsSetupLogMessageW 41 | @ stub WdsSubscribeEx 42 | @ stub WdsTerminate 43 | @ stub WdsUnlockExecutionGroup 44 | 45 | -- 46 | 2.40.0 47 | 48 | -------------------------------------------------------------------------------- /patches/0011-rbernon-patches/0011-bug-17173-v4/0006-winex11.drv-Restore-pointer-grab-on-FocusIn-events.patch: -------------------------------------------------------------------------------- 1 | From 5ef08deb14355f3f5ec4173ed407f15a65fd8e58 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Tue, 1 Oct 2019 11:21:24 +0200 4 | Subject: [PATCH 6/8] winex11.drv: Restore pointer grab on FocusIn events. 5 | 6 | This reverts commit 92177b0b161e91f1d609615d89d8e3199feea33f. 7 | 8 | We introduced unnecessary complexity by adding the last_clip_* state, 9 | we can instead use the ClipCursor state. 10 | 11 | This restores the ClipCursor on FocusIn events by sending a 12 | WM_X11DRV_CLIP_CURSOR message to the foreground window, which will query 13 | the current clipping rect from the server and apply it. 14 | --- 15 | dlls/winex11.drv/event.c | 3 +++ 16 | 1 file changed, 3 insertions(+) 17 | 18 | diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c 19 | index 11111111111..11111111111 100644 20 | --- a/dlls/winex11.drv/event.c 21 | +++ b/dlls/winex11.drv/event.c 22 | @@ -918,6 +918,9 @@ BOOL x11drv_handle_focus_in_event( HWND hwnd, XEvent *xev, Time time ) 23 | break; 24 | } 25 | 26 | + /* ask the desktop window to re-apply the current ClipCursor rect */ 27 | + send_message( NtUserGetDesktopWindow(), WM_X11DRV_DESKTOP_CLIP_CURSOR, FALSE, FALSE ); 28 | + 29 | /* ignore wm specific NotifyUngrab / NotifyGrab events w.r.t focus */ 30 | if (event->mode == NotifyGrab || event->mode == NotifyUngrab) return FALSE; 31 | 32 | -- 33 | 2.40.0 34 | 35 | -------------------------------------------------------------------------------- /patches/0002-fastsync/0024-ntdll-Use-server_wait_for_object-when-waiting-on-onl.patch: -------------------------------------------------------------------------------- 1 | From 821232e955e3cca5edac9781f32e12d041c619bc Mon Sep 17 00:00:00 2001 2 | From: Zebediah Figura 3 | Date: Tue, 20 Apr 2021 17:55:59 -0500 4 | Subject: [PATCH 24/29] ntdll: Use server_wait_for_object() when waiting on 5 | only the queue object. 6 | 7 | --- 8 | dlls/ntdll/unix/sync.c | 11 +++++++++++ 9 | 1 file changed, 11 insertions(+) 10 | 11 | diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/ntdll/unix/sync.c 14 | +++ b/dlls/ntdll/unix/sync.c 15 | @@ -893,6 +893,17 @@ static NTSTATUS fast_wait( DWORD count, const HANDLE *handles, BOOLEAN wait_any, 16 | objs[i] = cache[i]->obj; 17 | } 18 | 19 | + /* It's common to wait on the message queue alone. Some applications wait 20 | + * on it in fast paths, with a zero timeout. Since we take two server calls 21 | + * instead of one when going through fast_wait_objs(), and since we only 22 | + * need to go through that path if we're waiting on other objects, just 23 | + * delegate to the server if we're only waiting on the message queue. */ 24 | + if (count == 1 && queue) 25 | + { 26 | + release_fast_sync_obj( cache[0] ); 27 | + return server_wait_for_object( handles[0], alertable, timeout ); 28 | + } 29 | + 30 | if (queue) select_queue( queue ); 31 | 32 | ret = linux_wait_objs( device, count, objs, wait_any, alertable, timeout ); 33 | -- 34 | 2.40.0 35 | 36 | -------------------------------------------------------------------------------- /patches/0012-window-input-and-control-handling/ps0069-p0003-riched20-tests-Add-extra-test-for-IRichEditO.patch: -------------------------------------------------------------------------------- 1 | From: Dongwan Kim 2 | Subject: [PATCH 3/4] riched20/tests: Add extra test for IRichEditOle_GetObject 3 | Message-Id: <20211124020106.3704-3-kdw6485@gmail.com> 4 | Date: Wed, 24 Nov 2021 11:01:05 +0900 5 | In-Reply-To: <20211124020106.3704-1-kdw6485@gmail.com> 6 | References: <20211124020106.3704-1-kdw6485@gmail.com> 7 | 8 | Signed-off-by: Dongwan Kim 9 | --- 10 | dlls/riched20/tests/richole.c | 5 +++++ 11 | 1 file changed, 5 insertions(+) 12 | 13 | diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c 14 | index 11111111111..11111111111 100644 15 | --- a/dlls/riched20/tests/richole.c 16 | +++ b/dlls/riched20/tests/richole.c 17 | @@ -3956,6 +3956,11 @@ static void subtest_InsertObject(struct reolecb_obj *callback) 18 | CHECK_REOBJECT_STRUCT(reole, 1, REO_GETOBJ_ALL_INTERFACES, 0, 1, NULL, NULL, reo3.polesite, 3); 19 | CHECK_REOBJECT_STRUCT(reole, 2, REO_GETOBJ_ALL_INTERFACES, 0, 2, NULL, NULL, reo2.polesite, 2); 20 | 21 | + received_reo.cbStruct = sizeof(received_reo); 22 | + hr = IRichEditOle_GetObject(reole, 1, &received_reo, REO_GETOBJ_ALL_INTERFACES); 23 | + ok( received_reo.cp == 1 , "IRichEditOle_GetObject should fill the cp of structure REOBJ."); 24 | + 25 | + 26 | hr = IRichEditOle_GetObject(reole, 2, NULL, REO_GETOBJ_ALL_INTERFACES); 27 | ok(hr == E_INVALIDARG, "IRichEditOle_GetObject should fail: 0x%08lx\n", hr); 28 | 29 | 30 | -- 31 | 2.40.0 32 | 33 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0325-ntdll-Only-call-wine-exception-handlers-on-the-cur.patch: -------------------------------------------------------------------------------- 1 | From: "Rémi Bernon" 2 | Subject: [PATCH] ntdll: Only call wine exception handlers on the current stack. 3 | Message-Id: <20220131152416.548682-1-rbernon@codeweavers.com> 4 | Date: Mon, 31 Jan 2022 16:24:16 +0100 5 | 6 | MK11 creates an alternate stack and sometimes throws an exception which 7 | gets incorrectly handled by a Wine exception handler, causing the game 8 | to crash. 9 | 10 | Signed-off-by: Rémi Bernon 11 | --- 12 | dlls/ntdll/signal_x86_64.c | 4 +++- 13 | 1 file changed, 3 insertions(+), 1 deletion(-) 14 | 15 | diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c 16 | index 11111111111..11111111111 100644 17 | --- a/dlls/ntdll/signal_x86_64.c 18 | +++ b/dlls/ntdll/signal_x86_64.c 19 | @@ -482,7 +482,9 @@ static NTSTATUS call_stack_handlers( EXCEPTION_RECORD *rec, CONTEXT *orig_contex 20 | } 21 | } 22 | /* hack: call wine handlers registered in the tib list */ 23 | - else while ((ULONG64)teb_frame < context.Rsp) 24 | + else while ((ULONG64)teb_frame < context.Rsp && 25 | + (ULONG64)teb_frame >= (ULONG64)NtCurrentTeb()->Tib.StackLimit && 26 | + (ULONG64)teb_frame <= (ULONG64)NtCurrentTeb()->Tib.StackBase) 27 | { 28 | TRACE_(seh)( "found wine frame %p rsp %p handler %p\n", 29 | teb_frame, (void *)context.Rsp, teb_frame->Handler ); 30 | 31 | -- 32 | 2.40.0 33 | 34 | -------------------------------------------------------------------------------- /patches/0011-rbernon-patches/0009-wip-clipcursor-v1/0006-user32-Notify-the-driver-of-icon-destruction-before-.patch: -------------------------------------------------------------------------------- 1 | From 849085324088173caad5775327ea9aca01e3bc9c Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Thu, 24 Feb 2022 17:10:39 +0100 4 | Subject: [PATCH 06/13] user32: Notify the driver of icon destruction before 5 | releasing it. 6 | 7 | To prevent a race condition when sending desktop destroy notifications 8 | with the handle possibly re-used. 9 | --- 10 | dlls/win32u/cursoricon.c | 2 +- 11 | 1 file changed, 1 insertion(+), 1 deletion(-) 12 | 13 | diff --git a/dlls/win32u/cursoricon.c b/dlls/win32u/cursoricon.c 14 | index 11111111111..11111111111 100644 15 | --- a/dlls/win32u/cursoricon.c 16 | +++ b/dlls/win32u/cursoricon.c 17 | @@ -253,6 +253,7 @@ static BOOL free_icon_handle( HICON handle ) 18 | { 19 | struct cursoricon_object *obj = free_user_handle( handle, NTUSER_OBJ_ICON ); 20 | 21 | + user_driver->pDestroyCursorIcon( handle ); 22 | if (obj == OBJ_OTHER_PROCESS) WARN( "icon handle %p from other process\n", handle ); 23 | else if (obj) 24 | { 25 | @@ -291,7 +292,6 @@ static BOOL free_icon_handle( HICON handle ) 26 | if (!IS_INTRESOURCE( obj->resname )) free( obj->resname ); 27 | free( obj ); 28 | if (param) KeUserModeCallback( NtUserCallFreeIcon, ¶m, sizeof(param), &ret_ptr, &ret_len ); 29 | - user_driver->pDestroyCursorIcon( handle ); 30 | return TRUE; 31 | } 32 | return FALSE; 33 | -- 34 | 2.40.0 35 | 36 | -------------------------------------------------------------------------------- /patches/0012-window-input-and-control-handling/ps0048-winex11.drv-Fix-window-state-error-when-WS_MAXIMIZ.patch: -------------------------------------------------------------------------------- 1 | From: "Jiajin Cui" 2 | #Subject: [PATCH] winex11.drv: Fix window state error when WS_MAXIMIZE style. 3 | Message-Id: <202105281009363914811@uniontech.com> 4 | Date: Fri, 28 May 2021 10:10:36 +0800 5 | 6 | From ac29f87099fe29b40fbe9fd4a9d393da21bcf155 Mon Sep 17 00:00:00 2001 7 | From: Jiajin Cui 8 | Date: Fri, 28 May 2021 09:39:29 +0800 9 | Subject: [PATCH] winex11.drv: Fix window state error when WS_MAXIMIZE style. 10 | 11 | net_state must remove NET_WM_STATE_FULLSCREEN and NET_WM_STATE_MAXIMIZED Atoms when window have WS_MAXIMIZE style. 12 | 13 | Signed-off-by: Jiajin Cui 14 | --- 15 | dlls/winex11.drv/window.c | 2 +- 16 | 1 file changed, 1 insertion(+), 1 deletion(-) 17 | 18 | diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c 19 | index 11111111111..11111111111 100644 20 | --- a/dlls/winex11.drv/window.c 21 | +++ b/dlls/winex11.drv/window.c 22 | @@ -1067,7 +1067,7 @@ void update_net_wm_states( struct x11drv_win_data *data ) 23 | } 24 | 25 | if (style & WS_MINIMIZE) 26 | - new_state |= data->net_wm_state & ((1 << NET_WM_STATE_FULLSCREEN)|(1 << NET_WM_STATE_MAXIMIZED)); 27 | + new_state |= data->net_wm_state & ~((1 << NET_WM_STATE_FULLSCREEN)|(1 << NET_WM_STATE_MAXIMIZED)); 28 | if (fullscreen) 29 | { 30 | if ((style & WS_MAXIMIZE) && (style & WS_CAPTION) == WS_CAPTION) 31 | 32 | -- 33 | 2.40.0 34 | 35 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0030-p0001-msi-Properly-check-GetTokenInformation-retur.patch: -------------------------------------------------------------------------------- 1 | From: Serge Gautherie 2 | Subject: [PATCH 1/4] msi: Properly check GetTokenInformation() return values. 3 | Message-Id: <20200719081827.10144-1-winehq-git_serge_180711@gautherie.fr> 4 | Date: Sun, 19 Jul 2020 10:18:27 +0200 5 | 6 | Signed-off-by: Serge Gautherie 7 | --- 8 | dlls/msi/registry.c | 10 ++++++++-- 9 | 1 file changed, 8 insertions(+), 2 deletions(-) 10 | 11 | diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c 12 | index 11111111111..11111111111 100644 13 | --- a/dlls/msi/registry.c 14 | +++ b/dlls/msi/registry.c 15 | @@ -281,13 +281,19 @@ static WCHAR *get_user_sid(void) 16 | } 17 | if (!GetTokenInformation( token, TokenUser, user, size, &size )) 18 | { 19 | + DWORD le = GetLastError(); 20 | free( user ); 21 | - if (GetLastError() != ERROR_INSUFFICIENT_BUFFER || !(user = malloc( size ))) 22 | + if (le != ERROR_INSUFFICIENT_BUFFER || !(user = malloc( size ))) 23 | { 24 | CloseHandle( token ); 25 | return NULL; 26 | } 27 | - GetTokenInformation( token, TokenUser, user, size, &size ); 28 | + if (!GetTokenInformation( token, TokenUser, user, size, &size )) 29 | + { 30 | + free( user ); 31 | + CloseHandle( token ); 32 | + return NULL; 33 | + } 34 | } 35 | CloseHandle( token ); 36 | if (!ConvertSidToStringSidW( user->User.Sid, &ret )) 37 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0055-ntdll-Only-build-Linux-specific-functions-on-Linux.patch: -------------------------------------------------------------------------------- 1 | From: Gerald Pfeifer 2 | Subject: [PATCH] ntdll: Only build Linux-specific functions on Linux 3 | Message-Id: <20201206204633.8623E33E6A@hamza.pair.com> 4 | Date: Sun, 6 Dec 2020 21:46:25 +0100 (CET) 5 | 6 | logical_proc_info_add_by_id, logical_proc_info_add_cache, 7 | logical_proc_info_add_group, and logical_proc_info_add_numa_node 8 | are only useful and invoked on Linux, so disable their build 9 | elsewhere. 10 | 11 | (Without this compilers will, rightfully, warn about unused functions. 12 | GCC definitely does.) 13 | 14 | Signed-off-by: Gerald Pfeifer 15 | --- 16 | dlls/ntdll/unix/system.c | 4 ++++ 17 | 1 file changed, 4 insertions(+) 18 | 19 | diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c 20 | index 11111111111..11111111111 100644 21 | --- a/dlls/ntdll/unix/system.c 22 | +++ b/dlls/ntdll/unix/system.c 23 | @@ -652,6 +652,8 @@ struct cpu_topology_override *get_cpu_topology_override(void) 24 | return cpu_override.mapping.cpu_count ? &cpu_override.mapping : NULL; 25 | } 26 | 27 | +#ifdef linux 28 | + 29 | static BOOL grow_logical_proc_buf(void) 30 | { 31 | SYSTEM_LOGICAL_PROCESSOR_INFORMATION *new_data; 32 | @@ -873,6 +875,8 @@ static BOOL logical_proc_info_add_group( DWORD num_cpus, ULONG_PTR mask ) 33 | return TRUE; 34 | } 35 | 36 | +#endif 37 | + 38 | #ifdef linux 39 | 40 | /* Helper function for counting bitmap values as commonly used by the Linux kernel 41 | 42 | -- 43 | 2.40.0 44 | 45 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0380-ntoskrnl-Free-memory-before-pointer-gets-set-to-NU.patch: -------------------------------------------------------------------------------- 1 | From: "Bernhard Übelacker" 2 | Subject: ntoskrnl: Free memory before pointer gets set to NULL. 3 | Message-Id: <20220316100105.249851-1-bernhardu@mailbox.org> 4 | Date: Wed, 16 Mar 2022 11:01:05 +0100 5 | 6 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52322 7 | Signed-off-by: Bernhard Übelacker 8 | --- 9 | dlls/ntoskrnl.exe/ntoskrnl.c | 2 ++ 10 | 1 file changed, 2 insertions(+) 11 | 12 | diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c 13 | index 11111111111..11111111111 100644 14 | --- a/dlls/ntoskrnl.exe/ntoskrnl.c 15 | +++ b/dlls/ntoskrnl.exe/ntoskrnl.c 16 | @@ -832,6 +832,7 @@ static NTSTATUS dispatch_volume( struct dispatch_context *context ) 17 | irp->Tail.Overlay.Thread = (PETHREAD)KeGetCurrentThread(); 18 | irp->Tail.Overlay.OriginalFileObject = file; 19 | irp->RequestorMode = UserMode; 20 | + HeapFree( GetProcessHeap(), 0, context->in_buff ); 21 | context->in_buff = NULL; 22 | 23 | irp->Flags |= IRP_DEALLOCATE_BUFFER; /* deallocate out_buff */ 24 | @@ -1044,6 +1045,7 @@ NTSTATUS CDECL wine_ntoskrnl_main_loop( HANDLE stop_event ) 25 | if (ret == WAIT_OBJECT_0) 26 | { 27 | HeapFree( GetProcessHeap(), 0, context.in_buff ); 28 | + context.in_buff = NULL; 29 | status = STATUS_SUCCESS; 30 | goto done; 31 | } 32 | 33 | -- 34 | 2.40.0 35 | 36 | -------------------------------------------------------------------------------- /patches/0011-rbernon-patches/0013-wip-wm-cancelmode/0002-winemac.drv-Only-send-WM_CANCELMODE-if-a-menu-is-act.patch: -------------------------------------------------------------------------------- 1 | From 80f4a27ed76d643cbe7b79eb6a0458b07ec737c6 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Wed, 13 Nov 2019 13:01:05 +0100 4 | Subject: [PATCH 2/2] winemac.drv: Only send WM_CANCELMODE if a menu is active. 5 | 6 | --- 7 | dlls/winemac.drv/window.c | 7 ++++++- 8 | 1 file changed, 6 insertions(+), 1 deletion(-) 9 | 10 | diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c 11 | index 11111111111..11111111111 100644 12 | --- a/dlls/winemac.drv/window.c 13 | +++ b/dlls/winemac.drv/window.c 14 | @@ -2368,13 +2368,18 @@ void macdrv_window_got_focus(HWND hwnd, const macdrv_event *event) 15 | */ 16 | void macdrv_window_lost_focus(HWND hwnd, const macdrv_event *event) 17 | { 18 | + GUITHREADINFO threadinfo; 19 | if (!hwnd) return; 20 | 21 | TRACE("win %p/%p fg %p\n", hwnd, event->window, NtUserGetForegroundWindow()); 22 | 23 | if (hwnd == NtUserGetForegroundWindow()) 24 | { 25 | - send_message(hwnd, WM_CANCELMODE, 0, 0); 26 | + threadinfo.cbSize = sizeof(threadinfo); 27 | + NtUserGetGUIThreadInfo(0, &threadinfo); 28 | + if (threadinfo.flags & (GUI_INMENUMODE|GUI_INMOVESIZE|GUI_POPUPMENUMODE|GUI_SYSTEMMENUMODE)) 29 | + send_message(hwnd, WM_CANCELMODE, 0, 0); 30 | + 31 | if (hwnd == NtUserGetForegroundWindow()) 32 | NtUserSetForegroundWindow(NtUserGetDesktopWindow()); 33 | } 34 | -- 35 | 2.40.0 36 | 37 | -------------------------------------------------------------------------------- /patches/0012-window-input-and-control-handling/ps0056-p0001-win32u-Don-t-fire-EVENT_OBJECT_CREATE-for-di.patch: -------------------------------------------------------------------------------- 1 | From: Connor McAdams 2 | Subject: [PATCH 1/2] win32u: Don't fire EVENT_OBJECT_CREATE for dialog and popup windows upon creation. 3 | Message-Id: <20210812152714.645422-1-cmcadams@codeweavers.com> 4 | Date: Thu, 12 Aug 2021 11:27:13 -0400 5 | 6 | Popup menu and dialog window classes don't have EVENT_OBJECT_CREATE 7 | winevents associated with their creation. 8 | 9 | Signed-off-by: Connor McAdams 10 | --- 11 | dlls/win32u/window.c | 8 +++++++- 12 | 1 file changed, 7 insertions(+), 1 deletion(-) 13 | 14 | diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c 15 | index 11111111111..11111111111 100644 16 | --- a/dlls/win32u/window.c 17 | +++ b/dlls/win32u/window.c 18 | @@ -5423,7 +5423,13 @@ HWND WINAPI NtUserCreateWindowEx( DWORD ex_style, UNICODE_STRING *class_name, 19 | if (needs_cloak) 20 | user_driver->pSetWindowCompositionAttribute( hwnd, WCA_CLOAK, &needs_cloak ); 21 | 22 | - NtUserNotifyWinEvent( EVENT_OBJECT_CREATE, hwnd, OBJID_WINDOW, 0 ); 23 | + /* 24 | + * Popup menus and dialog windows don't get an EVENT_OBJECT_CREATE 25 | + * WinEvent on their creation. 26 | + */ 27 | + if (get_class_long( hwnd, GCW_ATOM, FALSE ) != POPUPMENU_CLASS_ATOM && 28 | + get_class_long( hwnd, GCW_ATOM, FALSE ) != DIALOG_CLASS_ATOM) 29 | + NtUserNotifyWinEvent( EVENT_OBJECT_CREATE, hwnd, OBJID_WINDOW, 0 ); 30 | 31 | /* send the size messages */ 32 | 33 | 34 | -- 35 | 2.40.0 36 | 37 | -------------------------------------------------------------------------------- /patches/0013-meta-files/ps0002-include-Add-include-guard-in-devguid.h.patch: -------------------------------------------------------------------------------- 1 | From: Vijay Kiran Kamuju 2 | #Subject: [PATCH] include: Add include guard in devguid.h 3 | Message-Id: 4 | Date: Wed, 24 Jun 2020 23:44:26 +0200 5 | 6 | Signed-off-by: Vijay Kiran Kamuju 7 | 8 | From 1eb825072c6316fefc67ee8145875ddfcde8a463 Mon Sep 17 00:00:00 2001 9 | From: Vijay Kiran Kamuju 10 | Date: Wed, 24 Jun 2020 23:07:03 +0200 11 | Subject: [PATCH] include: Add include guard in devguid.h 12 | 13 | Signed-off-by: Vijay Kiran Kamuju 14 | --- 15 | include/devguid.h | 5 +++++ 16 | 1 file changed, 5 insertions(+) 17 | 18 | diff --git a/include/devguid.h b/include/devguid.h 19 | index 11111111111..11111111111 100644 20 | --- a/include/devguid.h 21 | +++ b/include/devguid.h 22 | @@ -18,6 +18,9 @@ 23 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 24 | */ 25 | 26 | +#ifndef __WINE_DEVGUID_H 27 | +#define __WINE_DEVGUID_H 28 | + 29 | DEFINE_GUID( GUID_DEVCLASS_1394, 30 | 0x6BDD1FC1, 0x810F, 0x11D0, 0xBE, 0xC7, 0x08, 0x00, 0x2B, 0xE2, 0x09, 0x2F ); 31 | DEFINE_GUID( GUID_DEVCLASS_1394DEBUG, 32 | @@ -211,3 +214,5 @@ DEFINE_GUID( GUID_DEVCLASS_FSFILTER_SYSTEM, 33 | 0x5D1B9AAA, 0x01E2, 0x46AF, 0x84, 0x9F, 0x27, 0x2B, 0x3F, 0x32, 0x4C, 0x46 ); 34 | DEFINE_GUID( GUID_DEVCLASS_FSFILTER_INFRASTRUCTURE, 35 | 0xE55FA6F9, 0x128C, 0x4D04, 0xAB, 0xAB, 0x63, 0x0C, 0x74, 0xB1, 0x45, 0x3A ); 36 | + 37 | +#endif /* __WINE_DEVGUID_H */ 38 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0102-ntdll-Use-RTLD_NOLOAD-to-find-already-mapped-modul.patch: -------------------------------------------------------------------------------- 1 | From 36e637ec9c2e14836e316e30546c5f6936a7e249 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Fri, 31 Jul 2020 09:09:47 +0200 4 | Subject: [PATCH] ntdll: Use RTLD_NOLOAD to find already mapped modules. 5 | 6 | This makes it possible to detect modules that weren't unmapped from 7 | dlclose, and that we should not fixup again. 8 | --- 9 | dlls/ntdll/unix/loader.c | 6 ++++-- 10 | 1 file changed, 4 insertions(+), 2 deletions(-) 11 | 12 | diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c 13 | index 11111111111..11111111111 100644 14 | --- a/dlls/ntdll/unix/loader.c 15 | +++ b/dlls/ntdll/unix/loader.c 16 | @@ -1279,8 +1279,10 @@ static NTSTATUS dlopen_dll( const char *so_name, UNICODE_STRING *nt_name, void * 17 | { 18 | void *module, *handle; 19 | const IMAGE_NT_HEADERS *nt; 20 | + BOOL mapped = FALSE; 21 | 22 | - handle = dlopen( so_name, RTLD_NOW ); 23 | + if ((handle = dlopen( so_name, RTLD_NOW | RTLD_NOLOAD ))) mapped = TRUE; 24 | + else handle = dlopen( so_name, RTLD_NOW ); 25 | if (!handle) 26 | { 27 | WARN( "failed to load .so lib %s: %s\n", debugstr_a(so_name), dlerror() ); 28 | @@ -1302,7 +1304,7 @@ static NTSTATUS dlopen_dll( const char *so_name, UNICODE_STRING *nt_name, void * 29 | return STATUS_SUCCESS; 30 | } 31 | 32 | - if (map_so_dll( nt, module )) 33 | + if (!mapped && map_so_dll( nt, module )) 34 | { 35 | dlclose( handle ); 36 | return STATUS_NO_MEMORY; 37 | -------------------------------------------------------------------------------- /patches/0011-rbernon-patches/0007-wip-rawinput-v1/0007-server-Stop-enforcing-relative-rawinput-mouse-positi.patch: -------------------------------------------------------------------------------- 1 | From cb000c1815ed39324ce9f6e160b2b756e062190c Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Mon, 25 Oct 2021 11:22:04 +0200 4 | Subject: [PATCH 07/12] server: Stop enforcing relative rawinput mouse 5 | positions. 6 | 7 | --- 8 | server/queue.c | 6 +++--- 9 | 1 file changed, 3 insertions(+), 3 deletions(-) 10 | 11 | diff --git a/server/queue.c b/server/queue.c 12 | index 11111111111..11111111111 100644 13 | --- a/server/queue.c 14 | +++ b/server/queue.c 15 | @@ -2076,10 +2076,10 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons 16 | msg_data = &raw_msg.data; 17 | msg_data->info = input->mouse.info; 18 | msg_data->size = sizeof(*msg_data); 19 | - msg_data->flags = flags & ~(MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_VIRTUALDESK); 20 | + msg_data->flags = flags; 21 | msg_data->rawinput.type = RIM_TYPEMOUSE; 22 | - msg_data->rawinput.mouse.x = x - desktop->shared->cursor.x; 23 | - msg_data->rawinput.mouse.y = y - desktop->shared->cursor.y; 24 | + msg_data->rawinput.mouse.x = (flags & MOUSEEVENTF_MOVE) ? input->mouse.x : 0; 25 | + msg_data->rawinput.mouse.y = (flags & MOUSEEVENTF_MOVE) ? input->mouse.y : 0; 26 | msg_data->rawinput.mouse.data = input->mouse.data; 27 | 28 | enum_processes( queue_rawinput_message, &raw_msg ); 29 | -- 30 | 2.40.0 31 | 32 | -------------------------------------------------------------------------------- /patches/0012-window-input-and-control-handling/ps0014-comctl32-listview-If-there-is-no-scroll-bar-no-nee.patch: -------------------------------------------------------------------------------- 1 | From: Haoyang Chen 2 | #Subject: [PATCH] comctl32: If there is no scroll bar, no need to scroll. 3 | Message-Id: 4 | Date: Wed, 23 Sep 2020 16:45:23 +0800 5 | 6 | From e4a3892844dff368bf3e16d8cbebaaf86bf2cade Mon Sep 17 00:00:00 2001 7 | From: Haoyang Chen 8 | Date: Wed, 23 Sep 2020 16:36:30 +0800 9 | Subject: [PATCH] comctl32/listview: If there is no scroll bar, no need to scroll. 10 | 11 | Signed-off-by: Haoyang Chen 12 | --- 13 | dlls/comctl32/listview.c | 4 ++++ 14 | 1 file changed, 4 insertions(+) 15 | 16 | diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c 17 | index 11111111111..11111111111 100644 18 | --- a/dlls/comctl32/listview.c 19 | +++ b/dlls/comctl32/listview.c 20 | @@ -9808,6 +9808,8 @@ static LRESULT LISTVIEW_VScroll(LISTVIEW_INFO *infoPtr, INT nScrollCode, 21 | 22 | if (!GetScrollInfo(infoPtr->hwndSelf, SB_VERT, &scrollInfo)) return 1; 23 | 24 | + if(scrollInfo.nPage > scrollInfo.nMax) return 0; 25 | + 26 | nOldScrollPos = scrollInfo.nPos; 27 | switch (nScrollCode) 28 | { 29 | @@ -9912,6 +9914,8 @@ static LRESULT LISTVIEW_HScroll(LISTVIEW_INFO *infoPtr, INT nScrollCode, 30 | 31 | if (!GetScrollInfo(infoPtr->hwndSelf, SB_HORZ, &scrollInfo)) return 1; 32 | 33 | + if(scrollInfo.nPage > scrollInfo.nMax) return 0; 34 | + 35 | nOldScrollPos = scrollInfo.nPos; 36 | 37 | switch (nScrollCode) 38 | -------------------------------------------------------------------------------- /patches/0012-window-input-and-control-handling/ps0039-win32u-The-parent-window-with-WS_CLIPCHILDREN-styl.patch: -------------------------------------------------------------------------------- 1 | From: "Haidong Yu" 2 | #Subject: [PATCH] win32u: The parent window with WS_CLIPCHILDREN style should not be erased when hiding or resizing child. 3 | Message-Id: <39ed3b3b.56dd.1784625772d.Coremail.yhd986@163.com> 4 | Date: Fri, 19 Mar 2021 00:22:43 +0800 (CST) 5 | 6 |



 

7 | 8 | From 080e406ea7729c64f420b24c6bf8accf52f30362 Mon Sep 17 00:00:00 2001 9 | From: Haidong Yu 10 | Date: Thu, 18 Mar 2021 23:20:40 +0800 11 | Subject: [PATCH] win32u: The parent window with WS_CLIPCHILDREN style should 12 | not be erased when hiding or resizing child. 13 | 14 | Signed-off-by: Haidong Yu 15 | --- 16 | dlls/win32u/window.c | 2 +- 17 | 1 file changed, 1 insertion(+), 1 deletion(-) 18 | 19 | diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c 20 | index 11111111111..11111111111 100644 21 | --- a/dlls/win32u/window.c 22 | +++ b/dlls/win32u/window.c 23 | @@ -3580,7 +3580,7 @@ BOOL set_window_pos( WINDOWPOS *winpos, int parent_x, int parent_y ) 24 | { 25 | HWND parent = NtUserGetAncestor( winpos->hwnd, GA_PARENT ); 26 | if (!parent || parent == get_desktop_window()) parent = winpos->hwnd; 27 | - erase_now( parent, 0 ); 28 | + if (!(get_window_long(parent, GWL_STYLE) & WS_CLIPCHILDREN)) erase_now( parent, 0 ); 29 | } 30 | 31 | /* Give newly shown windows a chance to redraw */ 32 | 33 | -- 34 | 2.40.0 35 | 36 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0257-p0002-ntdll-Add-DECLSPEC_HOTPATCH-to-strrchr.patch: -------------------------------------------------------------------------------- 1 | From: "Roman Pišl" 2 | Subject: [PATCH 2/2] ntdll: Add DECLSPEC_HOTPATCH to strrchr. 3 | Message-Id: <20211208225259.68309-2-rpisl@seznam.cz> 4 | Date: Wed, 8 Dec 2021 23:52:59 +0100 5 | In-Reply-To: <20211208225259.68309-1-rpisl@seznam.cz> 6 | References: <20211208225259.68309-1-rpisl@seznam.cz> 7 | 8 | I see no other way how to make Clang ASAN work. 9 | ASAN recognizes first instruction(s) and inserts trampoline, but the loop 10 | in the function body jumps back to the start of the function (and hangs) 11 | or somewhere inside the trampoline (that leads to invalid instruction). 12 | 13 | Other fixes can be performed on the ASAN side, see the bug report. 14 | 15 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50993 16 | Signed-off-by: Roman Pišl 17 | --- 18 | dlls/ntdll/string.c | 2 +- 19 | 1 file changed, 1 insertion(+), 1 deletion(-) 20 | 21 | diff --git a/dlls/ntdll/string.c b/dlls/ntdll/string.c 22 | index 11111111111..11111111111 100644 23 | --- a/dlls/ntdll/string.c 24 | +++ b/dlls/ntdll/string.c 25 | @@ -499,7 +499,7 @@ char * __cdecl strpbrk( const char *str, const char *accept ) 26 | /********************************************************************* 27 | * strrchr (NTDLL.@) 28 | */ 29 | -char * __cdecl strrchr( const char *str, int c ) 30 | +char * __cdecl DECLSPEC_HOTPATCH strrchr( const char *str, int c ) 31 | { 32 | char *ret = NULL; 33 | do { if (*str == (char)c) ret = (char *)(ULONG_PTR)str; } while (*str++); 34 | 35 | -- 36 | 2.40.0 37 | 38 | -------------------------------------------------------------------------------- /patches/0012-window-input-and-control-handling/ps0023-win32u-No-need-to-change-the-z-order-of-the-foregr.patch: -------------------------------------------------------------------------------- 1 | From: Haoyang Chen 2 | Subject: [PATCH v2] win32u: No need to change the z-order of the foreground window. 3 | Message-Id: <02a5375e-bd42-7924-b620-67602094c815@uniontech.com> 4 | Date: Fri, 4 Dec 2020 17:46:26 +0800 5 | 6 | From 7ccc01f09f958ff5ceeffbd31e368fc4e8799995 Mon Sep 17 00:00:00 2001 7 | From: Haoyang Chen 8 | Date: Fri, 4 Dec 2020 17:25:15 +0800 9 | #Subject: [PATCH] win32u: No need to change the z-order of the foreground 10 | # window. 11 | 12 | Signed-off-by: Haoyang Chen 13 | --- 14 | dlls/win32u/window.c | 3 ++- 15 | 1 file changed, 2 insertions(+), 1 deletion(-) 16 | 17 | diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c 18 | index 11111111111..11111111111 100644 19 | --- a/dlls/win32u/window.c 20 | +++ b/dlls/win32u/window.c 21 | @@ -3354,7 +3354,8 @@ static BOOL fixup_swp_flags( WINDOWPOS *winpos, const RECT *old_window_rect, int 22 | 23 | if ((win->dwStyle & (WS_POPUP | WS_CHILD)) != WS_CHILD) 24 | { 25 | - if (!(winpos->flags & (SWP_NOACTIVATE|SWP_HIDEWINDOW)) && /* Bring to the top when activating */ 26 | + if (NtUserGetForegroundWindow() != winpos->hwnd && 27 | + !(winpos->flags & (SWP_NOACTIVATE|SWP_HIDEWINDOW)) && /* Bring to the top when activating */ 28 | (winpos->flags & SWP_NOZORDER || 29 | (winpos->hwndInsertAfter != HWND_TOPMOST && winpos->hwndInsertAfter != HWND_NOTOPMOST))) 30 | { 31 | 32 | -- 33 | 2.40.0 34 | 35 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0114-winebuild-Clear-RFLAGS-before-entering-syscall.patch: -------------------------------------------------------------------------------- 1 | From: "Rémi Bernon" 2 | Subject: [PATCH] winebuild: Clear RFLAGS before entering syscall. 3 | Message-Id: <20210601084301.2074741-1-rbernon@codeweavers.com> 4 | Date: Tue, 1 Jun 2021 10:43:01 +0200 5 | 6 | We pushed the flags, but kept them set. Far Cry sets NT flags, which 7 | causes later iretd instruction to raise a GP fault exception. 8 | 9 | This fixes a regression from e341d1f695311725752c287057f6c6ab60fdf2a3. 10 | 11 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50793 12 | Signed-off-by: Rémi Bernon 13 | --- 14 | dlls/ntdll/unix/signal_i386.c | 4 ++++ 15 | 1 file changed, 4 insertions(+) 16 | 17 | diff --git a/dlls/ntdll/unix/signal_i386.c b/dlls/ntdll/unix/signal_i386.c 18 | index 11111111111..11111111111 100644 19 | --- a/dlls/ntdll/unix/signal_i386.c 20 | +++ b/dlls/ntdll/unix/signal_i386.c 21 | @@ -2628,6 +2628,10 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, 22 | __ASM_CFI_REG_IS_AT1(eip, ecx, 0x08) 23 | "pushfl\n\t" 24 | __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") 25 | + "pushl $0x202\n\t" 26 | + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") 27 | + "popfl\n\t" 28 | + __ASM_CFI(".cfi_adjust_cfa_offset -4\n\t") 29 | "popl 0x04(%ecx)\n\t" /* frame->eflags */ 30 | __ASM_CFI(".cfi_adjust_cfa_offset -4\n\t") 31 | ".globl " __ASM_NAME("__wine_syscall_dispatcher_prolog_end") "\n" 32 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0289-conhost-Fix-status-for-READ_CONSOLE-ioctl.patch: -------------------------------------------------------------------------------- 1 | From: Keno Fischer 2 | Subject: [PATCH] conhost: Fix status for READ_CONSOLE ioctl 3 | Message-Id: 4 | Date: Wed, 29 Dec 2021 10:10:07 -0500 5 | 6 | Without this patch conhost would attempt to process non-existent input, 7 | spewing stdout with various cursor moves and incorrectly returning 8 | the ReadConsole call early. Fix that by only attempting input processing 9 | if there are actually input records to be processed and properly 10 | returning STATUS_PENDING if the input processing is not yet complete. 11 | 12 | Signed-off-by: Keno Fischer 13 | --- 14 | programs/conhost/conhost.c | 9 ++++++++- 15 | 1 file changed, 8 insertions(+), 1 deletion(-) 16 | 17 | diff --git a/programs/conhost/conhost.c b/programs/conhost/conhost.c 18 | index 11111111111..11111111111 100644 19 | --- a/programs/conhost/conhost.c 20 | +++ b/programs/conhost/conhost.c 21 | @@ -1462,7 +1462,14 @@ static NTSTATUS read_console( struct console *console, unsigned int ioctl, size_ 22 | ctx->ctrl_mask = ctrl_mask; 23 | 24 | console->pending_read = out_size; 25 | - return process_console_input( console ); 26 | + 27 | + /* If there are any pending input records, cook them now. */ 28 | + if (console->record_count) 29 | + { 30 | + process_console_input( console ); 31 | + } 32 | + 33 | + return console->edit_line.status; 34 | } 35 | 36 | 37 | static BOOL map_to_ctrlevent( struct console *console, const INPUT_RECORD *record, 38 | -- 39 | 2.40.0 40 | 41 | -------------------------------------------------------------------------------- /patches/0012-window-input-and-control-handling/ps0055-winex11.drv-When-mapping-a-layered-window-make-sur.patch: -------------------------------------------------------------------------------- 1 | From: Dmitry Timoshkov 2 | Subject: [PATCH] winex11.drv: When mapping a layered window make sure that surface has a valid bounding rectangle. 3 | Message-Id: <20210812172521.972bc72a259b06bc4e90a430@baikal.ru> 4 | Date: Thu, 12 Aug 2021 17:25:21 +0300 5 | 6 | Otherwise surface->flush() would be a no-op. 7 | This may happen 8 | 1. when UpdateLayeredWindow() was initially called on an invisible window 9 | 2. when a window is unmapped during being converted to managed 10 | 3. layered windows are mapped only once their attributes are set 11 | 12 | Signed-off-by: Dmitry Timoshkov 13 | --- 14 | dlls/winex11.drv/window.c | 3 +++ 15 | 1 file changed, 3 insertions(+) 16 | 17 | diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c 18 | index 11111111111..11111111111 100644 19 | --- a/dlls/winex11.drv/window.c 20 | +++ b/dlls/winex11.drv/window.c 21 | @@ -1267,7 +1267,10 @@ static void map_window( HWND hwnd, DWORD new_style ) 22 | XIconifyWindow( data->display, data->whole_window, data->vis.screen ); 23 | XFlush( data->display ); 24 | if (data->surface && data->vis.visualid != default_visual.visualid) 25 | + { 26 | + add_bounds_rect( data->surface->funcs->get_bounds( data->surface ), &data->window_rect ); 27 | data->surface->funcs->flush( data->surface ); 28 | + } 29 | } 30 | else set_xembed_flags( data, XEMBED_MAPPED ); 31 | 32 | 33 | -- 34 | 2.40.0 35 | 36 | -------------------------------------------------------------------------------- /patches/0012-window-input-and-control-handling/ps0092-winex11.drv-Call-XRaiseWindow-during-WM_TAKE_FOCUS.patch: -------------------------------------------------------------------------------- 1 | From: Ethan Searl 2 | Subject: [PATCH] winex11.drv: Call XRaiseWindow during WM_TAKE_FOCUS handler. 3 | Message-Id: <20211230194349.137988-1-internetethansearl@gmail.com> 4 | Date: Thu, 30 Dec 2021 14:43:49 -0500 5 | 6 | In the case where the original hwnd rejects the focus and we search for something else, raise the window because it may not be on top. This prevents showing modal windows on top of non-modal. 7 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=26503 8 | Signed-off-by: Ethan Searl 9 | --- 10 | dlls/winex11.drv/event.c | 11 +++++++++++ 11 | 1 file changed, 11 insertions(+) 12 | 13 | diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c 14 | index 11111111111..11111111111 100644 15 | --- a/dlls/winex11.drv/event.c 16 | +++ b/dlls/winex11.drv/event.c 17 | @@ -725,6 +725,17 @@ static void set_focus( XEvent *xev, HWND hwnd, Time time, BOOL check ) 18 | else focus = old_active; 19 | 20 | if (!(focus = find_activatable_window( focus, time, check ))) return; 21 | + 22 | + if (focus != hwnd) 23 | + { 24 | + Window win = X11DRV_get_whole_window( focus ); 25 | + if (win) 26 | + { 27 | + TRACE( "will raise window %p", focus ); 28 | + XRaiseWindow( xev->xany.display, win ); 29 | + } 30 | + } 31 | + 32 | TRACE( "setting foreground window to %p\n", focus ); 33 | set_foreground_window( focus, x11drv_time_to_ticks( time ) ); 34 | 35 | 36 | -- 37 | 2.40.0 38 | 39 | -------------------------------------------------------------------------------- /patches/0012-window-input-and-control-handling/ps0115-winex11.drv-optimize-repeated-ClipCursor-calls.patch: -------------------------------------------------------------------------------- 1 | From 4409b4ebdf12823d13d36df7b2084741853059c5 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?Jan=20Kl=C3=B6tzke?= 3 | Date: Sun, 11 Sep 2022 20:29:03 +0200 4 | Subject: [PATCH] winex11.drv: optimize repeated ClipCursor calls 5 | MIME-Version: 1.0 6 | Content-Type: text/plain; charset=UTF-8 7 | Content-Transfer-Encoding: 8bit 8 | 9 | At least Doom 64 calls ClipCursor() with identical parameters 10 | repeatedly, which seems to cause a considerable overhead. Together with 11 | high polling rate mouse input this causes the game to almost freeze 12 | while the mouse is being moved. So if the clipping did not change we can 13 | bail out early because it will not cause any observable difference 14 | anyway. 15 | 16 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46976 17 | Signed-off-by: Jan Klötzke 18 | --- 19 | dlls/winex11.drv/mouse.c | 4 ++++ 20 | 1 file changed, 4 insertions(+) 21 | 22 | diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c 23 | index 11111111111..11111111111 100644 24 | --- a/dlls/winex11.drv/mouse.c 25 | +++ b/dlls/winex11.drv/mouse.c 26 | @@ -460,6 +460,10 @@ static BOOL grab_clipping_window( const RECT *clip ) 27 | POINT pos; 28 | 29 | if (!data) return FALSE; 30 | + 31 | + if (clipping_cursor && EqualRect( clip, &clip_rect )) 32 | + return TRUE; 33 | + 34 | if (!(clip_window = init_clip_window())) return TRUE; 35 | 36 | TRACE( "clipping to %s win %lx\n", wine_dbgstr_rect(clip), clip_window ); 37 | -- 38 | 2.40.0 39 | 40 | -------------------------------------------------------------------------------- /patches/0015-gdi/ps0012-gdi32-Accept-16-bit-handles-in-get_dc_attr.patch: -------------------------------------------------------------------------------- 1 | From: Oleh Nykyforchyn 2 | Subject: [PATCH] gdi32: Accept 16-bit handles in get_dc_attr(). 3 | Message-Id: <20211023073459.25299-1-olen.nyk@gmail.com> 4 | Date: Sat, 23 Oct 2021 10:34:58 +0300 5 | 6 | When background is erased in a 16 bit app, a handle to DC is passed 7 | through USER16 functions, namely CallWindowProc16 (USER.122) and 8 | DefDriverProc16 (USER.255), whose respective parameters are of type 9 | WPARAM16, hence the upper part of the handle is cut. Later 10 | the returned handle is rejected by get_dc_attr() in GDI32 because 11 | its type is 0, although such handles are accepted by handle_entry(). 12 | This results in black and not cleared background. Allowing type==0 13 | in get_dc_attr() solves the problem. 14 | 15 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51899 16 | Signed-off-by: Oleh Nykyforchyn 17 | --- 18 | dlls/gdi32/dc.c | 2 +- 19 | 1 file changed, 1 insertion(+), 1 deletion(-) 20 | 21 | diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c 22 | index 11111111111..11111111111 100644 23 | --- a/dlls/gdi32/dc.c 24 | +++ b/dlls/gdi32/dc.c 25 | @@ -56,7 +56,7 @@ DC_ATTR *get_dc_attr( HDC hdc ) 26 | { 27 | DWORD type = gdi_handle_type( hdc ); 28 | DC_ATTR *dc_attr; 29 | - if ((type & 0x1f0000) != NTGDI_OBJ_DC || !(dc_attr = get_gdi_client_ptr( hdc, 0 ))) 30 | + if ((type && (type & 0x1f0000) != NTGDI_OBJ_DC) || !(dc_attr = get_gdi_client_ptr( hdc, 0 ))) 31 | { 32 | SetLastError( ERROR_INVALID_HANDLE ); 33 | return NULL; 34 | 35 | -- 36 | 2.40.0 37 | 38 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0018-p0002-user32-Clear-last-error-if-loading-an-icon-s.patch: -------------------------------------------------------------------------------- 1 | From: "Bernhard Übelacker" 2 | Subject: [PATCH 2/2] user32: Clear last error if loading an icon succeeded. 3 | Message-Id: <20200306143041.7595-2-bernhardu@mailbox.org> 4 | Date: Fri, 6 Mar 2020 15:30:41 +0100 5 | In-Reply-To: <20200306143041.7595-1-bernhardu@mailbox.org> 6 | References: <20200306143041.7595-1-bernhardu@mailbox.org> 7 | 8 | --- 9 | dlls/user32/cursoricon.c | 6 +++++- 10 | 1 file changed, 5 insertions(+), 1 deletion(-) 11 | 12 | diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c 13 | index 11111111111..11111111111 100644 14 | --- a/dlls/user32/cursoricon.c 15 | +++ b/dlls/user32/cursoricon.c 16 | @@ -2177,6 +2177,7 @@ HANDLE WINAPI LoadImageA( HINSTANCE hinst, LPCSTR name, UINT type, 17 | HANDLE WINAPI LoadImageW( HINSTANCE hinst, LPCWSTR name, UINT type, 18 | INT desiredx, INT desiredy, UINT loadflags ) 19 | { 20 | + HANDLE ret; 21 | int depth; 22 | WCHAR path[MAX_PATH]; 23 | 24 | @@ -2197,7 +2198,10 @@ HANDLE WINAPI LoadImageW( HINSTANCE hinst, LPCWSTR name, UINT type, 25 | case IMAGE_CURSOR: 26 | depth = 1; 27 | if (!(loadflags & LR_MONOCHROME)) depth = get_display_bpp(); 28 | - return CURSORICON_Load(hinst, name, desiredx, desiredy, depth, (type == IMAGE_CURSOR), loadflags); 29 | + ret = CURSORICON_Load(hinst, name, desiredx, desiredy, depth, (type == IMAGE_CURSOR), loadflags); 30 | + if (hinst && ret) 31 | + SetLastError(ERROR_SUCCESS); 32 | + return ret; 33 | } 34 | return 0; 35 | } 36 | -------------------------------------------------------------------------------- /patches/0015-gdi/ps0002-p0009-win32u-Print-full-bitmap-size-in-the-font-li.patch: -------------------------------------------------------------------------------- 1 | From 9936c5de2c495584cb6773a8120d59e192d08be4 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Fri, 6 Nov 2020 18:44:10 +0100 4 | Subject: [PATCH 09/11] win32u: Print full bitmap size in the font list. 5 | 6 | --- 7 | dlls/win32u/font.c | 8 +++++++- 8 | 1 file changed, 7 insertions(+), 1 deletion(-) 9 | 10 | diff --git a/dlls/win32u/font.c b/dlls/win32u/font.c 11 | index 11111111111..11111111111 100644 12 | --- a/dlls/win32u/font.c 13 | +++ b/dlls/win32u/font.c 14 | @@ -94,6 +94,12 @@ struct gdi_font_face 15 | struct wine_rb_entry full_name_entry; 16 | }; 17 | 18 | +static inline const char *debugstr_bitmap_font_size(struct bitmap_font_size *size) 19 | +{ 20 | + return wine_dbg_sprintf("width %2d, height %2d, size %2d, xppem %4d, yppem %4d, il %2d", 21 | + size->width, size->height, size->size, size->x_ppem, size->y_ppem, size->internal_leading); 22 | +} 23 | + 24 | static const struct font_backend_funcs *font_funcs; 25 | 26 | static const MAT2 identity = { {0,1}, {0,0}, {0,0}, {0,1} }; 27 | @@ -988,7 +994,7 @@ static void dump_gdi_font_list(void) 28 | { 29 | TRACE( "\t%s\t%s\t%08x", debugstr_w(face->style_name), debugstr_w(face->full_name), 30 | (int)face->fs.fsCsb[0] ); 31 | - if (!face->scalable) TRACE(" %d", face->size.height ); 32 | + if (!face->scalable) TRACE(" %s", debugstr_bitmap_font_size(&face->size) ); 33 | TRACE("\n"); 34 | } 35 | } 36 | -- 37 | 2.40.0 38 | 39 | -------------------------------------------------------------------------------- /patches/9989-misc/ps0310-configure-add-rpath-for-Unix-libs.patch: -------------------------------------------------------------------------------- 1 | From: "Alex Xu (Hello71)" 2 | Subject: [PATCH] configure: add rpath for Unix libs 3 | Message-Id: <20220119174135.6318-1-alex_y_xu@yahoo.ca> 4 | Date: Wed, 19 Jan 2022 12:41:35 -0500 5 | References: <20220119174135.6318-1-alex_y_xu.ref@yahoo.ca> 6 | 7 | wine expects that dlopen("/usr/lib/i386-windows/ntdll.so"); 8 | dlopen("/usr/lib/i386-windows/ws2_32.so") succeeds. this works on most 9 | libcs using ntdll.so SONAME, but fails for musl. there has been some 10 | discussion of implementing this in musl, but it is clearly more 11 | correct to specify rpath $ORIGIN for ELF, same as darwin. 12 | 13 | this was always broken on musl but not noticed before 6.19 because 14 | dlsym failure was ignored prior to 5689ec7bba ("ntdll: Return a failure 15 | if the unix call funcs don't exist.") 16 | 17 | Fixes https://bugs.winehq.org/show_bug.cgi?id=52418. 18 | --- 19 | configure.ac | 4 ++++ 20 | 1 file changed, 4 insertions(+) 21 | 22 | diff --git a/configure.ac b/configure.ac 23 | index 11111111111..11111111111 100644 24 | --- a/configure.ac 25 | +++ b/configure.ac 26 | @@ -797,6 +797,10 @@ case $host_os in 27 | [WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -Wl,-z,max-page-size=0x1000"]) 28 | ;; 29 | esac 30 | + 31 | + # musl does not satisfy pathless dlopen requests with prior pathed dlls 32 | + # do this at the end because it needs double dollar for makefile 33 | + WINE_TRY_CFLAGS([-Wl,-rpath,\\\$ORIGIN],[UNIXLDFLAGS="$UNIXLDFLAGS '-Wl,-rpath,\$\$ORIGIN'"]) 34 | ;; 35 | esac 36 | 37 | 38 | -- 39 | 2.40.0 40 | 41 | -------------------------------------------------------------------------------- /patches/9999-diffs/fsync-opt-semaphore-retry.patch: -------------------------------------------------------------------------------- 1 | diff --git a/dlls/ntdll/unix/fsync.c b/dlls/ntdll/unix/fsync.c 2 | index 11111111111..11111111111 100644 3 | --- a/dlls/ntdll/unix/fsync.c 4 | +++ b/dlls/ntdll/unix/fsync.c 5 | @@ -856,13 +856,15 @@ static NTSTATUS __fsync_wait_objects( DWORD count, const HANDLE *handles, 6 | struct semaphore *semaphore = obj->shm; 7 | int current; 8 | 9 | - if ((current = __atomic_load_n( &semaphore->count, __ATOMIC_SEQ_CST )) 10 | - && __sync_val_compare_and_swap( &semaphore->count, current, current - 1 ) == current) 11 | - { 12 | - TRACE("Woken up by handle %p [%d].\n", handles[i], i); 13 | - if (waited) simulate_sched_quantum(); 14 | - return i; 15 | - } 16 | + do { 17 | + if ((current = __atomic_load_n( &semaphore->count, __ATOMIC_SEQ_CST )) 18 | + && __sync_val_compare_and_swap( &semaphore->count, current, current - 1 ) == current) 19 | + { 20 | + TRACE("Woken up by handle %p [%d].\n", handles[i], i); 21 | + if (waited) simulate_sched_quantum(); 22 | + return i; 23 | + } 24 | + } while (current); 25 | 26 | futex_vector_set( &futexes[i], &semaphore->count, 0 ); 27 | break; 28 | --------------------------------------------------------------------------------