diff --git a/patches/eventfd_synchronization/0037-kernel32-tests-Mark-some-existing-tests-as-failing-u.patch b/patches/eventfd_synchronization/0037-kernel32-tests-Mark-some-existing-tests-as-failing-u.patch index f2afd441..99f70111 100644 --- a/patches/eventfd_synchronization/0037-kernel32-tests-Mark-some-existing-tests-as-failing-u.patch +++ b/patches/eventfd_synchronization/0037-kernel32-tests-Mark-some-existing-tests-as-failing-u.patch @@ -1,4 +1,4 @@ -From 4417ee6abe20066cb1bbc784c0705885a07b3966 Mon Sep 17 00:00:00 2001 +From fb71b7bedd8d2863a588473dc09a04dcd8b43b44 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Wed, 13 Jun 2018 22:25:40 -0500 Subject: [PATCH] kernel32/tests: Mark some existing tests as failing under @@ -9,27 +9,27 @@ Subject: [PATCH] kernel32/tests: Mark some existing tests as failing under 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/kernel32/tests/sync.c b/dlls/kernel32/tests/sync.c -index 2a47abf342c..ef900dcfc04 100644 +index 93cae1c84d5..b158ac905fd 100644 --- a/dlls/kernel32/tests/sync.c +++ b/dlls/kernel32/tests/sync.c -@@ -218,7 +218,8 @@ todo_wine +@@ -223,7 +223,8 @@ static void test_mutex(void) SetLastError(0xdeadbeef); hOpened = OpenMutexA(GENERIC_READ | GENERIC_WRITE, FALSE, "WineTestMutex"); - ok(hOpened != NULL, "OpenMutex failed with error %d\n", GetLastError()); + ok(hOpened != NULL, "OpenMutex failed with error %ld\n", GetLastError()); - wait_ret = WaitForSingleObject(hOpened, INFINITE); + wait_ret = WaitForSingleObject(hOpened, 0); +todo_wine_if(getenv("WINEESYNC")) /* XFAIL: validation is not implemented */ ok(wait_ret == WAIT_FAILED, "WaitForSingleObject succeeded\n"); CloseHandle(hOpened); -@@ -249,6 +250,7 @@ todo_wine +@@ -254,6 +255,7 @@ static void test_mutex(void) SetLastError(0xdeadbeef); ret = ReleaseMutex(hCreated); +todo_wine_if(getenv("WINEESYNC")) /* XFAIL: due to the above */ ok(!ret && (GetLastError() == ERROR_NOT_OWNER), - "ReleaseMutex should have failed with ERROR_NOT_OWNER instead of %d\n", GetLastError()); + "ReleaseMutex should have failed with ERROR_NOT_OWNER instead of %ld\n", GetLastError()); -- -2.28.0 +2.35.1 diff --git a/patches/eventfd_synchronization/0038-kernel32-tests-Add-some-semaphore-tests.patch b/patches/eventfd_synchronization/0038-kernel32-tests-Add-some-semaphore-tests.patch index 5893a0c8..2d3b676a 100644 --- a/patches/eventfd_synchronization/0038-kernel32-tests-Add-some-semaphore-tests.patch +++ b/patches/eventfd_synchronization/0038-kernel32-tests-Add-some-semaphore-tests.patch @@ -1,4 +1,4 @@ -From 775bf85e0e0614cbfe4494d7b8c47159cae5f47a Mon Sep 17 00:00:00 2001 +From 8592fcfbee64b776ce90c5edc5e9b67350665213 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Wed, 13 Jun 2018 22:40:47 -0500 Subject: [PATCH] kernel32/tests: Add some semaphore tests. @@ -8,10 +8,10 @@ Subject: [PATCH] kernel32/tests: Add some semaphore tests. 1 file changed, 97 insertions(+), 1 deletion(-) diff --git a/dlls/kernel32/tests/sync.c b/dlls/kernel32/tests/sync.c -index ef900dcfc04..26ccfdd4a54 100644 +index b158ac905fd..ad6ab1adc96 100644 --- a/dlls/kernel32/tests/sync.c +++ b/dlls/kernel32/tests/sync.c -@@ -577,7 +577,10 @@ static void test_event(void) +@@ -582,7 +582,10 @@ static void test_event(void) static void test_semaphore(void) { @@ -23,8 +23,8 @@ index ef900dcfc04..26ccfdd4a54 100644 /* test case sensitivity */ -@@ -619,6 +622,99 @@ static void test_semaphore(void) - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError()); +@@ -624,6 +627,99 @@ static void test_semaphore(void) + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError()); CloseHandle( handle ); + @@ -124,5 +124,5 @@ index ef900dcfc04..26ccfdd4a54 100644 static void test_waitable_timer(void) -- -2.28.0 +2.35.1 diff --git a/patches/eventfd_synchronization/0039-kernel32-tests-Add-some-event-tests.patch b/patches/eventfd_synchronization/0039-kernel32-tests-Add-some-event-tests.patch index 445c010b..651805a6 100644 --- a/patches/eventfd_synchronization/0039-kernel32-tests-Add-some-event-tests.patch +++ b/patches/eventfd_synchronization/0039-kernel32-tests-Add-some-event-tests.patch @@ -1,4 +1,4 @@ -From 30a65d88cd062f09f88513c377d2c7780e92e05d Mon Sep 17 00:00:00 2001 +From 8790bcd9d5ff4b2e38ca00a4ba7d1d884924b25e Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Wed, 13 Jun 2018 22:59:37 -0500 Subject: [PATCH] kernel32/tests: Add some event tests. @@ -8,10 +8,10 @@ Subject: [PATCH] kernel32/tests: Add some event tests. 1 file changed, 118 insertions(+), 1 deletion(-) diff --git a/dlls/kernel32/tests/sync.c b/dlls/kernel32/tests/sync.c -index 26ccfdd4a54..ea54cb069df 100644 +index ad6ab1adc96..95f51f54b83 100644 --- a/dlls/kernel32/tests/sync.c +++ b/dlls/kernel32/tests/sync.c -@@ -464,12 +464,13 @@ static void test_slist(void) +@@ -469,12 +469,13 @@ static void test_slist(void) static void test_event(void) { @@ -26,8 +26,8 @@ index 26ccfdd4a54..ea54cb069df 100644 /* no sd */ handle = CreateEventA(NULL, FALSE, FALSE, __FILE__ ": Test Event"); -@@ -573,6 +574,122 @@ static void test_event(void) - ok( ret, "QueryMemoryResourceNotification failed err %u\n", GetLastError() ); +@@ -578,6 +579,122 @@ static void test_event(void) + ok( ret, "QueryMemoryResourceNotification failed err %lu\n", GetLastError() ); ok( val == FALSE || val == TRUE, "wrong value %u\n", val ); CloseHandle( handle ); + @@ -150,5 +150,5 @@ index 26ccfdd4a54..ea54cb069df 100644 static void test_semaphore(void) -- -2.28.0 +2.35.1 diff --git a/patches/eventfd_synchronization/0041-kernel32-tests-Add-some-tests-for-wait-timeouts.patch b/patches/eventfd_synchronization/0041-kernel32-tests-Add-some-tests-for-wait-timeouts.patch index ac107b05..b4d5c591 100644 --- a/patches/eventfd_synchronization/0041-kernel32-tests-Add-some-tests-for-wait-timeouts.patch +++ b/patches/eventfd_synchronization/0041-kernel32-tests-Add-some-tests-for-wait-timeouts.patch @@ -1,4 +1,4 @@ -From 0596227ece99953785e8165d9c983114da77721c Mon Sep 17 00:00:00 2001 +From 9d683eab1efae1c8dcd5b571e8a31ac0f13fc563 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Wed, 13 Jun 2018 23:58:01 -0500 Subject: [PATCH] kernel32/tests: Add some tests for wait timeouts. @@ -8,10 +8,10 @@ Subject: [PATCH] kernel32/tests: Add some tests for wait timeouts. 1 file changed, 68 insertions(+) diff --git a/dlls/kernel32/tests/sync.c b/dlls/kernel32/tests/sync.c -index 790b7bfe797..6e4916f6bc3 100644 +index 4685b7bec06..117edf12fb6 100644 --- a/dlls/kernel32/tests/sync.c +++ b/dlls/kernel32/tests/sync.c -@@ -54,6 +54,7 @@ static BOOLEAN (WINAPI *pTryAcquireSRWLockShared)(PSRWLOCK); +@@ -57,6 +57,7 @@ static BOOLEAN (WINAPI *pTryAcquireSRWLockShared)(PSRWLOCK); static NTSTATUS (WINAPI *pNtAllocateVirtualMemory)(HANDLE, PVOID *, ULONG_PTR, SIZE_T *, ULONG, ULONG); static NTSTATUS (WINAPI *pNtFreeVirtualMemory)(HANDLE, PVOID *, SIZE_T *, ULONG); @@ -19,7 +19,7 @@ index 790b7bfe797..6e4916f6bc3 100644 static NTSTATUS (WINAPI *pNtWaitForSingleObject)(HANDLE, BOOLEAN, const LARGE_INTEGER *); static NTSTATUS (WINAPI *pNtWaitForMultipleObjects)(ULONG,const HANDLE*,BOOLEAN,BOOLEAN,const LARGE_INTEGER*); static PSLIST_ENTRY (__fastcall *pRtlInterlockedPushListSList)(PSLIST_HEADER list, PSLIST_ENTRY first, -@@ -1480,11 +1481,15 @@ static HANDLE modify_handle(HANDLE handle, DWORD modify) +@@ -1485,11 +1486,15 @@ static HANDLE modify_handle(HANDLE handle, DWORD modify) return ULongToHandle(tmp); } @@ -35,9 +35,9 @@ index 790b7bfe797..6e4916f6bc3 100644 DWORD ret; signaled = CreateEventW(NULL, TRUE, TRUE, NULL); -@@ -1569,6 +1574,68 @@ static void test_WaitForSingleObject(void) +@@ -1574,6 +1579,68 @@ static void test_WaitForSingleObject(void) status = pNtWaitForSingleObject(GetCurrentThread(), FALSE, &timeout); - ok(status == STATUS_TIMEOUT, "expected STATUS_TIMEOUT, got %08x\n", status); + ok(status == STATUS_TIMEOUT, "expected STATUS_TIMEOUT, got %08lx\n", status); + ret = WaitForSingleObject( signaled, 0 ); + ok(ret == 0, "got %u\n", ret); @@ -104,7 +104,7 @@ index 790b7bfe797..6e4916f6bc3 100644 CloseHandle(signaled); CloseHandle(nonsignaled); } -@@ -3037,6 +3104,7 @@ START_TEST(sync) +@@ -3113,6 +3180,7 @@ START_TEST(sync) pTryAcquireSRWLockShared = (void *)GetProcAddress(hdll, "TryAcquireSRWLockShared"); pNtAllocateVirtualMemory = (void *)GetProcAddress(hntdll, "NtAllocateVirtualMemory"); pNtFreeVirtualMemory = (void *)GetProcAddress(hntdll, "NtFreeVirtualMemory"); @@ -113,5 +113,5 @@ index 790b7bfe797..6e4916f6bc3 100644 pNtWaitForMultipleObjects = (void *)GetProcAddress(hntdll, "NtWaitForMultipleObjects"); pRtlInterlockedPushListSList = (void *)GetProcAddress(hntdll, "RtlInterlockedPushListSList"); -- -2.28.0 +2.35.1 diff --git a/patches/kernel32-Job_Tests/0001-kernel32-tests-Add-tests-for-job-object-accounting.patch b/patches/kernel32-Job_Tests/0001-kernel32-tests-Add-tests-for-job-object-accounting.patch index 3d8848ec..1f4c3c45 100644 --- a/patches/kernel32-Job_Tests/0001-kernel32-tests-Add-tests-for-job-object-accounting.patch +++ b/patches/kernel32-Job_Tests/0001-kernel32-tests-Add-tests-for-job-object-accounting.patch @@ -1,4 +1,4 @@ -From 5d8e7efe186c9a49005e1451ac04e4fc8f9bb2b8 Mon Sep 17 00:00:00 2001 +From 58eba4970c0ab92c7554d76eaa5e4f6571506dbc Mon Sep 17 00:00:00 2001 From: Mark Jansen Date: Sun, 24 Sep 2017 22:45:22 +0200 Subject: [PATCH] kernel32/tests: Add tests for job object accounting @@ -9,11 +9,11 @@ Signed-off-by: Mark Jansen 1 file changed, 95 insertions(+) diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c -index 52c3036fe59..1b72f8f4466 100644 +index e9e8555c32e..32318ecdffd 100644 --- a/dlls/kernel32/tests/process.c +++ b/dlls/kernel32/tests/process.c @@ -2541,6 +2541,69 @@ static void _create_process(int line, const char *command, LPPROCESS_INFORMATION - ok_(__FILE__, line)(ret, "CreateProcess error %u\n", GetLastError()); + ok_(__FILE__, line)(ret, "CreateProcess error %lu\n", GetLastError()); } +#define test_assigned_proc(job, ...) _test_assigned_proc(__LINE__, job, __VA_ARGS__) @@ -84,30 +84,30 @@ index 52c3036fe59..1b72f8f4466 100644 { @@ -2566,11 +2629,15 @@ static void test_IsProcessInJob(void) ret = pIsProcessInJob(pi.hProcess, job, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(!out, "IsProcessInJob returned out=%u\n", out); + test_assigned_proc(job, 0); + test_accounting(job, 0, 0, 0); out = TRUE; ret = pIsProcessInJob(pi.hProcess, job2, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(!out, "IsProcessInJob returned out=%u\n", out); + test_assigned_proc(job2, 0); + test_accounting(job2, 0, 0, 0); ret = pAssignProcessToJobObject(job, pi.hProcess); - ok(ret, "AssignProcessToJobObject error %u\n", GetLastError()); + ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError()); @@ -2579,11 +2646,15 @@ static void test_IsProcessInJob(void) ret = pIsProcessInJob(pi.hProcess, job, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(out, "IsProcessInJob returned out=%u\n", out); + test_assigned_proc(job, 1, pi.dwProcessId); + test_accounting(job, 1, 1, 0); out = TRUE; ret = pIsProcessInJob(pi.hProcess, job2, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(!out, "IsProcessInJob returned out=%u\n", out); + test_assigned_proc(job2, 0); + test_accounting(job2, 0, 0, 0); @@ -116,7 +116,7 @@ index 52c3036fe59..1b72f8f4466 100644 ret = pIsProcessInJob(pi.hProcess, NULL, &out); @@ -2597,6 +2668,8 @@ static void test_IsProcessInJob(void) ret = pIsProcessInJob(pi.hProcess, job, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(out, "IsProcessInJob returned out=%u\n", out); + test_assigned_proc(job, 0); + test_accounting(job, 1, 0, 0); @@ -126,28 +126,28 @@ index 52c3036fe59..1b72f8f4466 100644 @@ -2613,11 +2686,15 @@ static void test_TerminateJobObject(void) job = pCreateJobObjectW(NULL, NULL); - ok(job != NULL, "CreateJobObject error %u\n", GetLastError()); + ok(job != NULL, "CreateJobObject error %lu\n", GetLastError()); + test_assigned_proc(job, 0); + test_accounting(job, 0, 0, 0); create_process("wait", &pi); ret = pAssignProcessToJobObject(job, pi.hProcess); - ok(ret, "AssignProcessToJobObject error %u\n", GetLastError()); + ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError()); + test_assigned_proc(job, 1, pi.dwProcessId); + test_accounting(job, 1, 1, 0); ret = pTerminateJobObject(job, 123); - ok(ret, "TerminateJobObject error %u\n", GetLastError()); + ok(ret, "TerminateJobObject error %lu\n", GetLastError()); @@ -2626,6 +2703,8 @@ static void test_TerminateJobObject(void) dwret = WaitForSingleObject(pi.hProcess, 1000); - ok(dwret == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", dwret); + ok(dwret == WAIT_OBJECT_0, "WaitForSingleObject returned %lu\n", dwret); if (dwret == WAIT_TIMEOUT) TerminateProcess(pi.hProcess, 0); + test_assigned_proc(job, 0); + test_accounting(job, 1, 0, 0); ret = GetExitCodeProcess(pi.hProcess, &dwret); - ok(ret, "GetExitCodeProcess error %u\n", GetLastError()); + ok(ret, "GetExitCodeProcess error %lu\n", GetLastError()); @@ -2643,6 +2722,8 @@ static void test_TerminateJobObject(void) ret = pAssignProcessToJobObject(job, pi.hProcess); ok(!ret, "AssignProcessToJobObject unexpectedly succeeded\n"); @@ -157,41 +157,41 @@ index 52c3036fe59..1b72f8f4466 100644 CloseHandle(pi.hProcess); CloseHandle(pi.hThread); -@@ -2850,11 +2931,15 @@ static void test_KillOnJobClose(void) +@@ -2841,11 +2922,15 @@ static void test_KillOnJobClose(void) return; } - ok(ret, "SetInformationJobObject error %u\n", GetLastError()); + ok(ret, "SetInformationJobObject error %lu\n", GetLastError()); + test_assigned_proc(job, 0); + test_accounting(job, 0, 0, 0); create_process("wait", &pi); ret = pAssignProcessToJobObject(job, pi.hProcess); - ok(ret, "AssignProcessToJobObject error %u\n", GetLastError()); + ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError()); + test_assigned_proc(job, 1, pi.dwProcessId); + test_accounting(job, 1, 1, 0); CloseHandle(job); -@@ -2964,6 +3049,8 @@ static HANDLE test_AddSelfToJob(void) +@@ -2955,6 +3040,8 @@ static HANDLE test_AddSelfToJob(void) ret = pAssignProcessToJobObject(job, GetCurrentProcess()); - ok(ret, "AssignProcessToJobObject error %u\n", GetLastError()); + ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError()); + test_assigned_proc(job, 1, GetCurrentProcessId()); + test_accounting(job, 1, 1, 0); return job; } -@@ -2985,6 +3072,8 @@ static void test_jobInheritance(HANDLE job) +@@ -2976,6 +3063,8 @@ static void test_jobInheritance(HANDLE job) ret = pIsProcessInJob(pi.hProcess, job, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(out, "IsProcessInJob returned out=%u\n", out); + test_assigned_proc(job, 2, GetCurrentProcessId(), pi.dwProcessId); + test_accounting(job, 2, 2, 0); wait_and_close_child_process(&pi); } -@@ -3018,6 +3107,8 @@ static void test_BreakawayOk(HANDLE parent_job) +@@ -3009,6 +3098,8 @@ static void test_BreakawayOk(HANDLE parent_job) ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, CREATE_BREAKAWAY_FROM_JOB, NULL, NULL, &si, &pi); ok(!ret, "CreateProcessA expected failure\n"); expect_eq_d(ERROR_ACCESS_DENIED, GetLastError()); @@ -200,18 +200,18 @@ index 52c3036fe59..1b72f8f4466 100644 if (ret) { -@@ -3057,6 +3148,8 @@ static void test_BreakawayOk(HANDLE parent_job) +@@ -3048,6 +3139,8 @@ static void test_BreakawayOk(HANDLE parent_job) ret = pIsProcessInJob(pi.hProcess, job, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(!out, "IsProcessInJob returned out=%u\n", out); + test_assigned_proc(job, 1, GetCurrentProcessId()); + test_accounting(job, 2, 1, 0); ret = pIsProcessInJob(pi.hProcess, parent_job, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); -@@ -3074,6 +3167,8 @@ static void test_BreakawayOk(HANDLE parent_job) + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); +@@ -3065,6 +3158,8 @@ static void test_BreakawayOk(HANDLE parent_job) ret = pIsProcessInJob(pi.hProcess, job, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(!out, "IsProcessInJob returned out=%u\n", out); + test_assigned_proc(job, 1, GetCurrentProcessId()); + test_accounting(job, 2, 1, 0); @@ -219,5 +219,5 @@ index 52c3036fe59..1b72f8f4466 100644 wait_and_close_child_process(&pi); -- -2.30.2 +2.35.1 diff --git a/patches/ntdll-WRITECOPY/0009-kernel32-tests-psapi-tests-Update-tests.patch b/patches/ntdll-WRITECOPY/0009-kernel32-tests-psapi-tests-Update-tests.patch index 3a17b2a0..5d9c2c8e 100644 --- a/patches/ntdll-WRITECOPY/0009-kernel32-tests-psapi-tests-Update-tests.patch +++ b/patches/ntdll-WRITECOPY/0009-kernel32-tests-psapi-tests-Update-tests.patch @@ -1,36 +1,36 @@ -From ed30d93e063cb68111dc8f64d125f3f48cf3098e Mon Sep 17 00:00:00 2001 +From 8671f494a85acab0f8620bb4462d641f6fd97111 Mon Sep 17 00:00:00 2001 From: Andrew Wesie Date: Mon, 27 Apr 2020 15:32:22 +0300 Subject: [PATCH] kernel32/tests, psapi/tests: Update tests. --- - dlls/kernel32/tests/virtual.c | 19 ++----------------- + dlls/kernel32/tests/virtual.c | 25 +++++-------------------- dlls/psapi/tests/psapi_main.c | 5 +++++ - 2 files changed, 7 insertions(+), 17 deletions(-) + 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c -index a3b2d365c33..45f79903ddd 100644 +index 365194b9065..6c5d6991737 100644 --- a/dlls/kernel32/tests/virtual.c +++ b/dlls/kernel32/tests/virtual.c @@ -3604,9 +3604,7 @@ static void test_CreateFileMapping_protection(void) SetLastError(0xdeadbeef); ret = VirtualQuery(base, &info, sizeof(info)); - ok(ret, "VirtualQuery failed %d\n", GetLastError()); + ok(ret, "VirtualQuery failed %ld\n", GetLastError()); - /* FIXME: remove the condition below once Wine is fixed */ - todo_wine_if (td[i].prot == PAGE_WRITECOPY || td[i].prot == PAGE_EXECUTE_WRITECOPY) -- ok(info.Protect == td[i].prot_after_write, "%d: got %#x != expected %#x\n", i, info.Protect, td[i].prot_after_write); -+ ok(info.Protect == td[i].prot_after_write, "%d: got %#x != expected %#x\n", i, info.Protect, td[i].prot_after_write); +- ok(info.Protect == td[i].prot_after_write, "%ld: got %#lx != expected %#lx\n", i, info.Protect, td[i].prot_after_write); ++ ok(info.Protect == td[i].prot_after_write, "%ld: got %#lx != expected %#lx\n", i, info.Protect, td[i].prot_after_write); } } else @@ -3620,9 +3618,7 @@ static void test_CreateFileMapping_protection(void) SetLastError(0xdeadbeef); ret = VirtualProtect(base, si.dwPageSize, PAGE_NOACCESS, &old_prot); - ok(ret, "%d: VirtualProtect error %d\n", i, GetLastError()); + ok(ret, "%ld: VirtualProtect error %ld\n", i, GetLastError()); - /* FIXME: remove the condition below once Wine is fixed */ - todo_wine_if (td[i].prot == PAGE_WRITECOPY || td[i].prot == PAGE_EXECUTE_WRITECOPY) -- ok(old_prot == td[i].prot_after_write, "%d: got %#x != expected %#x\n", i, old_prot, td[i].prot_after_write); -+ ok(old_prot == td[i].prot_after_write, "%d: got %#x != expected %#x\n", i, old_prot, td[i].prot_after_write); +- ok(old_prot == td[i].prot_after_write, "%ld: got %#lx != expected %#lx\n", i, old_prot, td[i].prot_after_write); ++ ok(old_prot == td[i].prot_after_write, "%ld: got %#lx != expected %#lx\n", i, old_prot, td[i].prot_after_write); UnmapViewOfFile(base); } @@ -39,39 +39,41 @@ index a3b2d365c33..45f79903ddd 100644 } - todo_wine_if(readonly && page_prot[k] == PAGE_WRITECOPY && view[j].prot != PAGE_WRITECOPY) - ok(ret, "VirtualProtect error %d, map %#x, view %#x, requested prot %#x\n", GetLastError(), page_prot[i], view[j].prot, page_prot[k]); + ok(ret, "VirtualProtect error %ld, map %#lx, view %#lx, requested prot %#lx\n", GetLastError(), page_prot[i], view[j].prot, page_prot[k]); - todo_wine_if(readonly && page_prot[k] == PAGE_WRITECOPY && view[j].prot != PAGE_WRITECOPY) - ok(old_prot == prev_prot, "got %#x, expected %#x\n", old_prot, prev_prot); + ok(old_prot == prev_prot, "got %#lx, expected %#lx\n", old_prot, prev_prot); prev_prot = actual_prot; ret = VirtualQuery(base, &info, sizeof(info)); - ok(ret, "%d: VirtualQuery failed %d\n", j, GetLastError()); +- ok(ret, "%ld: VirtualQuery failed %ld\n", j, GetLastError()); - todo_wine_if(readonly && page_prot[k] == PAGE_WRITECOPY && view[j].prot != PAGE_WRITECOPY) ++ ok(ret, "%d: VirtualQuery failed %ld\n", j, GetLastError()); ok(info.Protect == actual_prot, - "VirtualProtect wrong prot, map %#x, view %#x, requested prot %#x got %#x\n", + "VirtualProtect wrong prot, map %#lx, view %#lx, requested prot %#lx got %#lx\n", page_prot[i], view[j].prot, page_prot[k], info.Protect ); @@ -4038,15 +4031,12 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly ) if (!anon_mapping && is_compatible_protection(alloc_prot, PAGE_WRITECOPY)) { ret = VirtualProtect(base, sec_flags & SEC_IMAGE ? si.dwPageSize : 2*si.dwPageSize, PAGE_WRITECOPY, &old_prot); - todo_wine_if(readonly && view[j].prot != PAGE_WRITECOPY) - ok(ret, "VirtualProtect error %d, map %#x, view %#x\n", GetLastError(), page_prot[i], view[j].prot); + ok(ret, "VirtualProtect error %ld, map %#lx, view %#lx\n", GetLastError(), page_prot[i], view[j].prot); if (ret) *(DWORD*)base = 0xdeadbeef; ret = VirtualQuery(base, &info, sizeof(info)); - ok(ret, "%d: VirtualQuery failed %d\n", j, GetLastError()); +- ok(ret, "%ld: VirtualQuery failed %ld\n", j, GetLastError()); - todo_wine - ok(info.Protect == PAGE_READWRITE, "VirtualProtect wrong prot, map %#x, view %#x got %#x\n", ++ ok(ret, "%d: VirtualQuery failed %ld\n", j, GetLastError()); + ok(info.Protect == PAGE_READWRITE, "VirtualProtect wrong prot, map %#lx, view %#lx got %#lx\n", page_prot[i], view[j].prot, info.Protect ); - todo_wine_if (!(sec_flags & SEC_IMAGE)) - ok(info.RegionSize == si.dwPageSize, "wrong region size %#lx after write, map %#x, view %#x got %#x\n", + ok(info.RegionSize == si.dwPageSize, "wrong region size %#Ix after write, map %#lx, view %#lx got %#lx\n", info.RegionSize, page_prot[i], view[j].prot, info.Protect ); @@ -4057,7 +4047,6 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly ) { ret = VirtualQuery((char*)base + si.dwPageSize, &info, sizeof(info)); - ok(ret, "%d: VirtualQuery failed %d\n", j, GetLastError()); + ok(ret, "%ld: VirtualQuery failed %ld\n", j, GetLastError()); - todo_wine_if(readonly && view[j].prot != PAGE_WRITECOPY) - ok(info.Protect == PAGE_WRITECOPY, "wrong prot, map %#x, view %#x got %#x\n", + ok(info.Protect == PAGE_WRITECOPY, "wrong prot, map %#lx, view %#lx got %#lx\n", page_prot[i], view[j].prot, info.Protect); } @@ -4077,14 +4066,11 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly ) @@ -79,22 +81,23 @@ index a3b2d365c33..45f79903ddd 100644 } - todo_wine_if(readonly && page_prot[k] == PAGE_WRITECOPY && view[j].prot != PAGE_WRITECOPY) - ok(ret, "VirtualProtect error %d, map %#x, view %#x, requested prot %#x\n", GetLastError(), page_prot[i], view[j].prot, page_prot[k]); + ok(ret, "VirtualProtect error %ld, map %#lx, view %#lx, requested prot %#lx\n", GetLastError(), page_prot[i], view[j].prot, page_prot[k]); - todo_wine_if(readonly && page_prot[k] == PAGE_WRITECOPY && view[j].prot != PAGE_WRITECOPY) - ok(old_prot == prev_prot, "got %#x, expected %#x\n", old_prot, prev_prot); + ok(old_prot == prev_prot, "got %#lx, expected %#lx\n", old_prot, prev_prot); ret = VirtualQuery(base, &info, sizeof(info)); - ok(ret, "%d: VirtualQuery failed %d\n", j, GetLastError()); +- ok(ret, "%ld: VirtualQuery failed %ld\n", j, GetLastError()); - todo_wine_if( map_prot_written( page_prot[k] ) != actual_prot ) ++ ok(ret, "%d: VirtualQuery failed %ld\n", j, GetLastError()); ok(info.Protect == map_prot_written( page_prot[k] ), - "VirtualProtect wrong prot, map %#x, view %#x, requested prot %#x got %#x\n", + "VirtualProtect wrong prot, map %#lx, view %#lx, requested prot %#lx got %#lx\n", page_prot[i], view[j].prot, page_prot[k], info.Protect ); @@ -4125,7 +4111,6 @@ static void test_mappings(void) SetFilePointer(hfile, 0, NULL, FILE_BEGIN); ok(ReadFile(hfile, &data, sizeof(data), &num_bytes, NULL), "ReadFile failed\n"); - ok(num_bytes == sizeof(data), "num_bytes = %d\n", num_bytes); + ok(num_bytes == sizeof(data), "num_bytes = %ld\n", num_bytes); - todo_wine - ok(!data, "data = %x\n", data); + ok(!data, "data = %lx\n", data); CloseHandle( hfile ); diff --git a/dlls/psapi/tests/psapi_main.c b/dlls/psapi/tests/psapi_main.c @@ -121,5 +124,5 @@ index 185a4062092..519e39c3df0 100644 check_QueryWorkingSetEx(addr, "exe,readonly2", 1, PAGE_READONLY, 1, FALSE); -- -2.34.1 +2.35.1 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 09862d10..0f013d9e 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -51,7 +51,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "18230d23c599f1f5f9dd419dccc11c49117cc3b8" + echo "330dc601978922aa1d5864d29d94882d6b1990d1" } # Show version information @@ -3165,7 +3165,7 @@ fi # | * [#43124] FlashWindowEx: WM_NCACTIVATE behavior is incorrect # | # | Modified files: -# | * dlls/user32/tests/win.c, dlls/user32/win.c +# | * dlls/user32/tests/win.c, dlls/win32u/window.c # | if test "$enable_user32_FlashWindowEx" -eq 1; then patch_apply user32-FlashWindowEx/0001-user32-Improve-FlashWindowEx-message-and-return-valu.patch @@ -3360,7 +3360,7 @@ fi # | * [#46274] user32: Prevent a recursive loop with the activation messages. # | # | Modified files: -# | * dlls/user32/focus.c, dlls/user32/tests/msg.c, dlls/user32/win.h +# | * dlls/user32/focus.c, dlls/user32/tests/msg.c, dlls/win32u/input.c, dlls/win32u/ntuser_private.h # | if test "$enable_user32_recursive_activation" -eq 1; then patch_apply user32-recursive-activation/0001-user32-focus-Prevent-a-recursive-loop-with-the-activ.patch @@ -3794,7 +3794,7 @@ fi # | * [#2155] Forward activate window requests to WM using _NET_ACTIVE_WINDOW # | # | Modified files: -# | * dlls/user32/driver.c, dlls/user32/focus.c, dlls/win32u/driver.c, dlls/winex11.drv/event.c, dlls/winex11.drv/init.c, +# | * dlls/user32/driver.c, dlls/win32u/driver.c, dlls/win32u/input.c, dlls/winex11.drv/event.c, dlls/winex11.drv/init.c, # | dlls/winex11.drv/window.c, dlls/winex11.drv/x11drv.h, dlls/winex11.drv/x11drv_main.c, include/wine/gdi_driver.h # | if test "$enable_winex11__NET_ACTIVE_WINDOW" -eq 1; then diff --git a/patches/server-Key_State/0001-server-Create-message-queue-and-thread-input-in-set_.patch b/patches/server-Key_State/0001-server-Create-message-queue-and-thread-input-in-set_.patch index 31b611b2..facdc129 100644 --- a/patches/server-Key_State/0001-server-Create-message-queue-and-thread-input-in-set_.patch +++ b/patches/server-Key_State/0001-server-Create-message-queue-and-thread-input-in-set_.patch @@ -1,4 +1,4 @@ -From 4778b1c3d59bd87b067b6266e38ddd9a5d8bae86 Mon Sep 17 00:00:00 2001 +From d0142599d03573c50c889a7f9091a9ff2459304b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Thu, 1 Apr 2021 23:19:18 +0200 Subject: [PATCH] server: Create message queue and thread input in @@ -19,10 +19,10 @@ Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45385 2 files changed, 28 insertions(+), 27 deletions(-) diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c -index 63163b7ed01..c146e4b5cd9 100644 +index 6cbf0d6254e..853c0f66df6 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c -@@ -3761,8 +3761,8 @@ struct get_key_state_thread_params +@@ -3962,8 +3962,8 @@ struct get_key_state_thread_params int index; }; @@ -33,9 +33,9 @@ index 63163b7ed01..c146e4b5cd9 100644 { unsigned char keystate[256]; BOOL ret; -@@ -3771,18 +3771,18 @@ static void check_get_keyboard_state_(int i, int j, int c, int x, int todo_c, in +@@ -3972,18 +3972,18 @@ static void check_get_keyboard_state_(int i, int j, int c, int x, int todo_c, in ret = GetKeyboardState(keystate); - ok_(__FILE__, line)(ret, "GetKeyboardState failed, %u\n", GetLastError()); + ok_(__FILE__, line)(ret, "GetKeyboardState failed, %lu\n", GetLastError()); todo_wine_if(todo_x) ok_(__FILE__, line)(!(keystate['X'] & 0x80) == !x, "%d:%d: expected that X keystate is %s\n", i, j, x ? "set" : "unset"); - todo_wine_if(todo_c) ok_(__FILE__, line)(!(keystate['C'] & 0x80) == !c, "%d:%d: expected that C keystate is %s\n", i, j, c ? "set" : "unset"); + ok_(__FILE__, line)(!(keystate['C'] & 0x80) == !c, "%d:%d: expected that C keystate is %s\n", i, j, c ? "set" : "unset"); @@ -43,7 +43,7 @@ index 63163b7ed01..c146e4b5cd9 100644 /* calling it twice shouldn't change */ memset(keystate, 0, sizeof(keystate)); ret = GetKeyboardState(keystate); - ok_(__FILE__, line)(ret, "GetKeyboardState failed, %u\n", GetLastError()); + ok_(__FILE__, line)(ret, "GetKeyboardState failed, %lu\n", GetLastError()); todo_wine_if(todo_x) ok_(__FILE__, line)(!(keystate['X'] & 0x80) == !x, "%d:%d: expected that X keystate is %s\n", i, j, x ? "set" : "unset"); - todo_wine_if(todo_c) ok_(__FILE__, line)(!(keystate['C'] & 0x80) == !c, "%d:%d: expected that C keystate is %s\n", i, j, c ? "set" : "unset"); + ok_(__FILE__, line)(!(keystate['C'] & 0x80) == !c, "%d:%d: expected that C keystate is %s\n", i, j, c ? "set" : "unset"); @@ -56,7 +56,7 @@ index 63163b7ed01..c146e4b5cd9 100644 { SHORT state; -@@ -3791,7 +3791,7 @@ static void check_get_key_state_(int i, int j, int c, int x, int todo_c, int tod +@@ -3992,7 +3992,7 @@ static void check_get_key_state_(int i, int j, int c, int x, int todo_c, int tod ok_(__FILE__, line)(!(state & 0x007e), "%d:%d: expected that X undefined bits are unset, got %#x\n", i, j, state); state = GetKeyState('C'); @@ -65,7 +65,7 @@ index 63163b7ed01..c146e4b5cd9 100644 ok_(__FILE__, line)(!(state & 0x007e), "%d:%d: expected that C undefined bits are unset, got %#x\n", i, j, state); } -@@ -3808,7 +3808,7 @@ static DWORD WINAPI get_key_state_thread(void *arg) +@@ -4009,7 +4009,7 @@ static DWORD WINAPI get_key_state_thread(void *arg) int i = params->index, j; test = get_key_state_tests + i; @@ -74,7 +74,7 @@ index 63163b7ed01..c146e4b5cd9 100644 if (test->peek_message) { -@@ -3841,18 +3841,18 @@ static DWORD WINAPI get_key_state_thread(void *arg) +@@ -4042,18 +4042,18 @@ static DWORD WINAPI get_key_state_thread(void *arg) if (test->set_keyboard_state) expect_c = TRUE; else expect_c = FALSE; @@ -88,7 +88,7 @@ index 63163b7ed01..c146e4b5cd9 100644 /* key released */ ReleaseSemaphore(semaphores[0], 1, NULL); result = WaitForSingleObject(semaphores[1], 1000); - ok(result == WAIT_OBJECT_0, "%d: WaitForSingleObject returned %u\n", i, result); + ok(result == WAIT_OBJECT_0, "%d: WaitForSingleObject returned %lu\n", i, result); - check_get_keyboard_state(i, j, expect_c, expect_x, /* todo */ i == 6, has_queue || i == 6 || j > 0); - check_get_key_state(i, j, expect_c, FALSE, /* todo */ i == 6, FALSE); @@ -99,7 +99,7 @@ index 63163b7ed01..c146e4b5cd9 100644 } return 0; -@@ -3920,18 +3920,18 @@ static void test_GetKeyState(void) +@@ -4121,18 +4121,18 @@ static void test_GetKeyState(void) } else expect_c = FALSE; @@ -124,7 +124,7 @@ index 63163b7ed01..c146e4b5cd9 100644 ReleaseSemaphore(params.semaphores[1], 1, NULL); -@@ -3947,15 +3947,15 @@ static void test_GetKeyState(void) +@@ -4148,15 +4148,15 @@ static void test_GetKeyState(void) SetKeyboardState(keystate); } @@ -147,10 +147,10 @@ index 63163b7ed01..c146e4b5cd9 100644 ReleaseSemaphore(params.semaphores[1], 1, NULL); } diff --git a/server/queue.c b/server/queue.c -index b026c03e13d..5c9f91a13c5 100644 +index 4f69a082b74..561fa825ee7 100644 --- a/server/queue.c +++ b/server/queue.c -@@ -3007,9 +3007,10 @@ DECL_HANDLER(get_key_state) +@@ -3080,9 +3080,10 @@ DECL_HANDLER(get_key_state) DECL_HANDLER(set_key_state) { struct desktop *desktop; @@ -163,5 +163,5 @@ index b026c03e13d..5c9f91a13c5 100644 { memcpy( desktop->keystate, get_req_data(), size ); -- -2.30.2 +2.35.1 diff --git a/patches/server-Key_State/0002-server-Lock-thread-input-keystate-whenever-it-is-mod.patch b/patches/server-Key_State/0002-server-Lock-thread-input-keystate-whenever-it-is-mod.patch index db1418af..6e32facc 100644 --- a/patches/server-Key_State/0002-server-Lock-thread-input-keystate-whenever-it-is-mod.patch +++ b/patches/server-Key_State/0002-server-Lock-thread-input-keystate-whenever-it-is-mod.patch @@ -1,4 +1,4 @@ -From a6f4d1c57d31c0a8f50afd5af9d50b7e587c84f5 Mon Sep 17 00:00:00 2001 +From ffa3222c7cfdd76ec21342e9540b01073d2e4bd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Thu, 1 Apr 2021 23:30:46 +0200 Subject: [PATCH] server: Lock thread input keystate whenever it is modified. @@ -19,10 +19,10 @@ Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45385 2 files changed, 53 insertions(+), 4 deletions(-) diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c -index c146e4b5cd9..246569961be 100644 +index 853c0f66df6..848b52d3870 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c -@@ -3842,15 +3842,15 @@ static DWORD WINAPI get_key_state_thread(void *arg) +@@ -4043,15 +4043,15 @@ static DWORD WINAPI get_key_state_thread(void *arg) else expect_c = FALSE; check_get_keyboard_state(i, j, expect_c, FALSE, /* todo */ !has_queue); @@ -34,7 +34,7 @@ index c146e4b5cd9..246569961be 100644 /* key released */ ReleaseSemaphore(semaphores[0], 1, NULL); result = WaitForSingleObject(semaphores[1], 1000); - ok(result == WAIT_OBJECT_0, "%d: WaitForSingleObject returned %u\n", i, result); + ok(result == WAIT_OBJECT_0, "%d: WaitForSingleObject returned %lu\n", i, result); - check_get_keyboard_state(i, j, expect_c, expect_x, /* todo */ has_queue || j > 0); + check_get_keyboard_state(i, j, expect_c, expect_x, /* todo */ !has_queue && j > 0); @@ -42,10 +42,10 @@ index c146e4b5cd9..246569961be 100644 check_get_keyboard_state(i, j, expect_c, FALSE, /* todo */ FALSE); } diff --git a/server/queue.c b/server/queue.c -index 5c9f91a13c5..0782c526327 100644 +index 561fa825ee7..9e0b9836965 100644 --- a/server/queue.c +++ b/server/queue.c -@@ -114,6 +114,8 @@ struct thread_input +@@ -112,6 +112,8 @@ struct thread_input int cursor_count; /* cursor show count */ struct list msg_list; /* list of hardware messages */ unsigned char keystate[256]; /* state of each key */ @@ -54,7 +54,7 @@ index 5c9f91a13c5..0782c526327 100644 }; struct msg_queue -@@ -140,6 +142,7 @@ struct msg_queue +@@ -138,6 +140,7 @@ struct msg_queue struct thread_input *input; /* thread input descriptor */ struct hook_table *hooks; /* hook table */ timeout_t last_get_msg; /* time of last get message call */ @@ -62,7 +62,7 @@ index 5c9f91a13c5..0782c526327 100644 }; struct hotkey -@@ -265,12 +268,14 @@ static struct thread_input *create_thread_input( struct thread *thread ) +@@ -263,12 +266,14 @@ static struct thread_input *create_thread_input( struct thread *thread ) list_init( &input->msg_list ); set_caret_window( input, 0 ); memset( input->keystate, 0, sizeof(input->keystate) ); @@ -77,7 +77,7 @@ index 5c9f91a13c5..0782c526327 100644 } return input; } -@@ -305,6 +310,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_ +@@ -303,6 +308,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_ queue->input = (struct thread_input *)grab_object( input ); queue->hooks = NULL; queue->last_get_msg = current_time; @@ -85,7 +85,7 @@ index 5c9f91a13c5..0782c526327 100644 list_init( &queue->send_result ); list_init( &queue->callback_result ); list_init( &queue->pending_timers ); -@@ -326,6 +332,31 @@ void free_msg_queue( struct thread *thread ) +@@ -324,6 +330,31 @@ void free_msg_queue( struct thread *thread ) thread->queue = NULL; } @@ -117,7 +117,7 @@ index 5c9f91a13c5..0782c526327 100644 /* change the thread input data of a given thread */ static int assign_thread_input( struct thread *thread, struct thread_input *new_input ) { -@@ -339,9 +370,11 @@ static int assign_thread_input( struct thread *thread, struct thread_input *new_ +@@ -337,9 +368,11 @@ static int assign_thread_input( struct thread *thread, struct thread_input *new_ if (queue->input) { queue->input->cursor_count -= queue->cursor_count; @@ -129,7 +129,7 @@ index 5c9f91a13c5..0782c526327 100644 new_input->cursor_count += queue->cursor_count; return 1; } -@@ -477,6 +510,11 @@ static inline int is_signaled( struct msg_queue *queue ) +@@ -476,6 +509,11 @@ static inline int is_signaled( struct msg_queue *queue ) /* set some queue bits */ static inline void set_queue_bits( struct msg_queue *queue, unsigned int bits ) { @@ -141,7 +141,7 @@ index 5c9f91a13c5..0782c526327 100644 queue->wake_bits |= bits; queue->changed_bits |= bits; if (is_signaled( queue )) wake_up( &queue->obj, 0 ); -@@ -487,6 +525,11 @@ static inline void clear_queue_bits( struct msg_queue *queue, unsigned int bits +@@ -486,6 +524,11 @@ static inline void clear_queue_bits( struct msg_queue *queue, unsigned int bits { queue->wake_bits &= ~bits; queue->changed_bits &= ~bits; @@ -153,7 +153,7 @@ index 5c9f91a13c5..0782c526327 100644 } /* check whether msg is a keyboard message */ -@@ -1031,6 +1074,7 @@ static void msg_queue_destroy( struct object *obj ) +@@ -1030,6 +1073,7 @@ static void msg_queue_destroy( struct object *obj ) } if (queue->timeout) remove_timeout_user( queue->timeout ); queue->input->cursor_count -= queue->cursor_count; @@ -161,7 +161,7 @@ index 5c9f91a13c5..0782c526327 100644 release_object( queue->input ); if (queue->hooks) release_object( queue->hooks ); if (queue->fd) release_object( queue->fd ); -@@ -2997,7 +3041,11 @@ DECL_HANDLER(get_key_state) +@@ -3070,7 +3114,11 @@ DECL_HANDLER(get_key_state) else { unsigned char *keystate = current->queue->input->keystate; @@ -174,7 +174,7 @@ index 5c9f91a13c5..0782c526327 100644 set_reply_data( keystate, size ); } } -@@ -3011,6 +3059,7 @@ DECL_HANDLER(set_key_state) +@@ -3084,6 +3132,7 @@ DECL_HANDLER(set_key_state) data_size_t size = min( 256, get_req_data_size() ); memcpy( queue->input->keystate, get_req_data(), size ); @@ -183,5 +183,5 @@ index 5c9f91a13c5..0782c526327 100644 { memcpy( desktop->keystate, get_req_data(), size ); -- -2.30.2 +2.35.1 diff --git a/patches/server-Key_State/0003-server-Create-message-queue-and-thread-input-in-get_.patch b/patches/server-Key_State/0003-server-Create-message-queue-and-thread-input-in-get_.patch index 49d60fe5..950ffeff 100644 --- a/patches/server-Key_State/0003-server-Create-message-queue-and-thread-input-in-get_.patch +++ b/patches/server-Key_State/0003-server-Create-message-queue-and-thread-input-in-get_.patch @@ -1,4 +1,4 @@ -From a6a449881f6643183316ad867b49bd99f53fa4a4 Mon Sep 17 00:00:00 2001 +From b93e17f4dbd548edff543c2607755ba0d7a844d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Thu, 1 Apr 2021 23:41:31 +0200 Subject: [PATCH] server: Create message queue and thread input in @@ -18,10 +18,10 @@ Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45385 2 files changed, 28 insertions(+), 40 deletions(-) diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c -index 246569961be..561f932b18b 100644 +index 848b52d3870..71eaace7d7f 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c -@@ -3761,8 +3761,8 @@ struct get_key_state_thread_params +@@ -3962,8 +3962,8 @@ struct get_key_state_thread_params int index; }; @@ -32,10 +32,10 @@ index 246569961be..561f932b18b 100644 { unsigned char keystate[256]; BOOL ret; -@@ -3770,24 +3770,24 @@ static void check_get_keyboard_state_(int i, int j, int c, int x, int todo_x, in +@@ -3971,24 +3971,24 @@ static void check_get_keyboard_state_(int i, int j, int c, int x, int todo_x, in memset(keystate, 0, sizeof(keystate)); ret = GetKeyboardState(keystate); - ok_(__FILE__, line)(ret, "GetKeyboardState failed, %u\n", GetLastError()); + ok_(__FILE__, line)(ret, "GetKeyboardState failed, %lu\n", GetLastError()); - todo_wine_if(todo_x) ok_(__FILE__, line)(!(keystate['X'] & 0x80) == !x, "%d:%d: expected that X keystate is %s\n", i, j, x ? "set" : "unset"); + ok_(__FILE__, line)(!(keystate['X'] & 0x80) == !x, "%d:%d: expected that X keystate is %s\n", i, j, x ? "set" : "unset"); ok_(__FILE__, line)(!(keystate['C'] & 0x80) == !c, "%d:%d: expected that C keystate is %s\n", i, j, c ? "set" : "unset"); @@ -43,7 +43,7 @@ index 246569961be..561f932b18b 100644 /* calling it twice shouldn't change */ memset(keystate, 0, sizeof(keystate)); ret = GetKeyboardState(keystate); - ok_(__FILE__, line)(ret, "GetKeyboardState failed, %u\n", GetLastError()); + ok_(__FILE__, line)(ret, "GetKeyboardState failed, %lu\n", GetLastError()); - todo_wine_if(todo_x) ok_(__FILE__, line)(!(keystate['X'] & 0x80) == !x, "%d:%d: expected that X keystate is %s\n", i, j, x ? "set" : "unset"); + ok_(__FILE__, line)(!(keystate['X'] & 0x80) == !x, "%d:%d: expected that X keystate is %s\n", i, j, x ? "set" : "unset"); ok_(__FILE__, line)(!(keystate['C'] & 0x80) == !c, "%d:%d: expected that C keystate is %s\n", i, j, c ? "set" : "unset"); @@ -62,7 +62,7 @@ index 246569961be..561f932b18b 100644 ok_(__FILE__, line)(!(state & 0x007e), "%d:%d: expected that X undefined bits are unset, got %#x\n", i, j, state); state = GetKeyState('C'); -@@ -3841,18 +3841,18 @@ static DWORD WINAPI get_key_state_thread(void *arg) +@@ -4042,18 +4042,18 @@ static DWORD WINAPI get_key_state_thread(void *arg) if (test->set_keyboard_state) expect_c = TRUE; else expect_c = FALSE; @@ -76,7 +76,7 @@ index 246569961be..561f932b18b 100644 /* key released */ ReleaseSemaphore(semaphores[0], 1, NULL); result = WaitForSingleObject(semaphores[1], 1000); - ok(result == WAIT_OBJECT_0, "%d: WaitForSingleObject returned %u\n", i, result); + ok(result == WAIT_OBJECT_0, "%d: WaitForSingleObject returned %lu\n", i, result); - check_get_keyboard_state(i, j, expect_c, expect_x, /* todo */ !has_queue && j > 0); - check_get_key_state(i, j, expect_c, FALSE, /* todo */ FALSE); @@ -87,7 +87,7 @@ index 246569961be..561f932b18b 100644 } return 0; -@@ -3920,18 +3920,18 @@ static void test_GetKeyState(void) +@@ -4121,18 +4121,18 @@ static void test_GetKeyState(void) } else expect_c = FALSE; @@ -112,7 +112,7 @@ index 246569961be..561f932b18b 100644 ReleaseSemaphore(params.semaphores[1], 1, NULL); -@@ -3947,15 +3947,15 @@ static void test_GetKeyState(void) +@@ -4148,15 +4148,15 @@ static void test_GetKeyState(void) SetKeyboardState(keystate); } @@ -135,10 +135,10 @@ index 246569961be..561f932b18b 100644 ReleaseSemaphore(params.semaphores[1], 1, NULL); } diff --git a/server/queue.c b/server/queue.c -index 0782c526327..fce65e360d4 100644 +index 9e0b9836965..d79add56fba 100644 --- a/server/queue.c +++ b/server/queue.c -@@ -3025,25 +3025,13 @@ DECL_HANDLER(get_key_state) +@@ -3098,25 +3098,13 @@ DECL_HANDLER(get_key_state) set_reply_data( desktop->keystate, size ); release_object( desktop ); } @@ -168,5 +168,5 @@ index 0782c526327..fce65e360d4 100644 } set_reply_data( keystate, size ); -- -2.30.2 +2.35.1 diff --git a/patches/shdocvw-ParseURLFromOutsideSource_Tests/0001-shdocvw-Check-precisely-ParseURLFromOutsideSourceX-r.patch b/patches/shdocvw-ParseURLFromOutsideSource_Tests/0001-shdocvw-Check-precisely-ParseURLFromOutsideSourceX-r.patch index ad3cad6a..e1236a8f 100644 --- a/patches/shdocvw-ParseURLFromOutsideSource_Tests/0001-shdocvw-Check-precisely-ParseURLFromOutsideSourceX-r.patch +++ b/patches/shdocvw-ParseURLFromOutsideSource_Tests/0001-shdocvw-Check-precisely-ParseURLFromOutsideSourceX-r.patch @@ -1,4 +1,4 @@ -From a929cd0341d3b2a340a94fa74259676a43e21e06 Mon Sep 17 00:00:00 2001 +From 1d120cc8d5c61d0642ac7d186b5cd172eadece08 Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Tue, 3 Sep 2013 23:28:14 +0200 Subject: [PATCH] shdocvw: Check precisely ParseURLFromOutsideSourceX returned @@ -51,7 +51,7 @@ index b5b60054f2c..50524cf43e0 100644 } needed--; diff --git a/dlls/shdocvw/tests/shdocvw.c b/dlls/shdocvw/tests/shdocvw.c -index d54cf1613ac..167fcf1a92c 100644 +index fcfd4a644db..f010062ac31 100644 --- a/dlls/shdocvw/tests/shdocvw.c +++ b/dlls/shdocvw/tests/shdocvw.c @@ -212,13 +212,13 @@ static void test_ParseURLFromOutsideSourceA(void) @@ -65,9 +65,9 @@ index d54cf1613ac..167fcf1a92c 100644 - ok( res != 0 && len == ParseURL_table[i].len && + ok( res == (ParseURL_table[i].len+1) && len == ParseURL_table[i].len && !lstrcmpA(buffer, ParseURL_table[i].newurl), -- "#%d: got %d and %d with '%s' (expected '!=0' and %d with '%s')\n", +- "#%d: got %ld and %ld with '%s' (expected '!=0' and %ld with '%s')\n", - i, res, len, buffer, ParseURL_table[i].len, ParseURL_table[i].newurl); -+ "#%d: got %d and %d with '%s' (expected %d and %d with '%s')\n", ++ "#%d: got %ld and %ld with '%s' (expected %ld and %ld with '%s')\n", + i, res, len, buffer, ParseURL_table[i].len+1, ParseURL_table[i].len, ParseURL_table[i].newurl); @@ -82,11 +82,11 @@ index d54cf1613ac..167fcf1a92c 100644 - ok( res != 0 && len == ParseURL_table[0].len && + ok( res == 1 && len == ParseURL_table[0].len && !lstrcmpA(bufferA, ParseURL_table[0].newurl), -- "got %d and %d with '%s' (expected '!=0' and %d with '%s')\n", -+ "got %d and %d with '%s' (expected 1 and %d with '%s')\n", +- "got %ld and %ld with '%s' (expected '!=0' and %ld with '%s')\n", ++ "got %ld and %ld with '%s' (expected 1 and %d with '%s')\n", res, len, bufferA, ParseURL_table[0].len, ParseURL_table[0].newurl); -- -2.34.1 +2.35.1 diff --git a/patches/shell32-NewMenu_Interface/0001-shell32-Implement-NewMenu-with-new-folder-item.patch b/patches/shell32-NewMenu_Interface/0001-shell32-Implement-NewMenu-with-new-folder-item.patch index 6c3aa219..44e92c73 100644 --- a/patches/shell32-NewMenu_Interface/0001-shell32-Implement-NewMenu-with-new-folder-item.patch +++ b/patches/shell32-NewMenu_Interface/0001-shell32-Implement-NewMenu-with-new-folder-item.patch @@ -1,4 +1,4 @@ -From 229c08d829424f218cb09b0b6e9cc8c2d8489359 Mon Sep 17 00:00:00 2001 +From 98b6fa0725d376b912932352637968f8e53432de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sun, 16 Aug 2015 17:34:22 +0200 Subject: [PATCH] shell32: Implement NewMenu with new folder item. @@ -21,7 +21,7 @@ Correct header issue when compiling i386 (var_arg) create mode 100644 dlls/shell32/shellnew.c diff --git a/dlls/shell32/Makefile.in b/dlls/shell32/Makefile.in -index bb03300f9c9..c52017a7490 100644 +index 7cc704e56b6..40df42aaaf2 100644 --- a/dlls/shell32/Makefile.in +++ b/dlls/shell32/Makefile.in @@ -29,6 +29,7 @@ C_SRCS = \ @@ -49,10 +49,10 @@ index 22ef49ae5c7..699ad1a2f03 100644 threading(apartment), uuid(00bb2763-6a77-11d0-a535-00c04fd7d062) diff --git a/dlls/shell32/shell32_main.h b/dlls/shell32/shell32_main.h -index 388f6ace073..8a1bca0fa7c 100644 +index c39520371ec..26034777f0e 100644 --- a/dlls/shell32/shell32_main.h +++ b/dlls/shell32/shell32_main.h -@@ -102,6 +102,7 @@ HRESULT WINAPI RecycleBin_Constructor(IUnknown * pUnkOuter, REFIID riif, LPVOID +@@ -101,6 +101,7 @@ HRESULT WINAPI RecycleBin_Constructor(IUnknown * pUnkOuter, REFIID riif, LPVOID HRESULT WINAPI QueryAssociations_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppOutput) DECLSPEC_HIDDEN; HRESULT WINAPI ExplorerBrowser_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN; HRESULT WINAPI KnownFolderManager_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN; @@ -62,7 +62,7 @@ index 388f6ace073..8a1bca0fa7c 100644 HRESULT WINAPI CPanel_ExtractIconA(LPITEMIDLIST pidl, LPCSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize) DECLSPEC_HIDDEN; diff --git a/dlls/shell32/shellnew.c b/dlls/shell32/shellnew.c new file mode 100644 -index 00000000000..04d718f0f0d +index 00000000000..a825d5a39a9 --- /dev/null +++ b/dlls/shell32/shellnew.c @@ -0,0 +1,497 @@ @@ -564,10 +564,10 @@ index 00000000000..04d718f0f0d + return hr; +} diff --git a/dlls/shell32/shellole.c b/dlls/shell32/shellole.c -index 5b72fecf07e..fc29a73fbb7 100644 +index 7cd46ba2d98..7265e1660ac 100644 --- a/dlls/shell32/shellole.c +++ b/dlls/shell32/shellole.c -@@ -73,6 +73,7 @@ static const struct { +@@ -72,6 +72,7 @@ static const struct { {&CLSID_MyComputer, ISF_MyComputer_Constructor}, {&CLSID_MyDocuments, MyDocuments_Constructor}, {&CLSID_NetworkPlaces, ISF_NetworkPlaces_Constructor}, @@ -576,7 +576,7 @@ index 5b72fecf07e..fc29a73fbb7 100644 {&CLSID_QueryAssociations, QueryAssociations_Constructor}, {&CLSID_RecycleBin, RecycleBin_Constructor}, diff --git a/dlls/shell32/tests/shlview.c b/dlls/shell32/tests/shlview.c -index 48ba72a4c0e..dbb24d93564 100644 +index b405a84bc19..c5849965777 100644 --- a/dlls/shell32/tests/shlview.c +++ b/dlls/shell32/tests/shlview.c @@ -1479,7 +1479,6 @@ static void test_newmenu(void) @@ -584,11 +584,11 @@ index 48ba72a4c0e..dbb24d93564 100644 hr = CoCreateInstance(&CLSID_NewMenu, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - todo_wine - ok(hr == S_OK, "Failed to create NewMenu object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create NewMenu object, hr %#lx.\n", hr); if (hr != S_OK) { @@ -1491,6 +1490,14 @@ static void test_newmenu(void) - ok(hr == S_OK, "Failed to get IShellExtInit, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get IShellExtInit, hr %#lx.\n", hr); IUnknown_Release(unk2); + hr = IUnknown_QueryInterface(unk, &IID_IContextMenu, (void **)&unk2); @@ -600,8 +600,8 @@ index 48ba72a4c0e..dbb24d93564 100644 + IUnknown_Release(unk2); + hr = IUnknown_QueryInterface(unk, &IID_IContextMenu3, (void **)&unk2); - ok(hr == S_OK, "Failed to get IContextMenu3, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get IContextMenu3, hr %#lx.\n", hr); IUnknown_Release(unk2); -- -2.34.1 +2.35.1 diff --git a/patches/shell32-SHFileOperation_Move/0001-shell32-Fix-SHFileOperation-FO_MOVE-for-creating-sub.patch b/patches/shell32-SHFileOperation_Move/0001-shell32-Fix-SHFileOperation-FO_MOVE-for-creating-sub.patch index ff8ee4f5..e58bab02 100644 --- a/patches/shell32-SHFileOperation_Move/0001-shell32-Fix-SHFileOperation-FO_MOVE-for-creating-sub.patch +++ b/patches/shell32-SHFileOperation_Move/0001-shell32-Fix-SHFileOperation-FO_MOVE-for-creating-sub.patch @@ -1,7 +1,8 @@ -From 7c3743c12f6b8a7fa015da3c231d1b0817978e4b Mon Sep 17 00:00:00 2001 +From 147822d028471e1ffa83193c9df85c4f7c04bc8b Mon Sep 17 00:00:00 2001 From: Zhenbo Li Date: Fri, 14 Aug 2015 21:18:43 +0800 -Subject: shell32: Fix SHFileOperation(FO_MOVE) for creating subdirectories. +Subject: [PATCH] shell32: Fix SHFileOperation(FO_MOVE) for creating + subdirectories. This patch fixes bug 25207. --- @@ -10,10 +11,10 @@ This patch fixes bug 25207. 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c -index c843dd7..e7f8107 100644 +index 17a8e7046c7..01e1ab13bf5 100644 --- a/dlls/shell32/shlfileop.c +++ b/dlls/shell32/shlfileop.c -@@ -1427,7 +1427,11 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const +@@ -1420,7 +1420,11 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const } if (!PathFileExistsW(flTo->feFiles[0].szDirectory)) @@ -27,10 +28,10 @@ index c843dd7..e7f8107 100644 if (lpFileOp->fFlags & FOF_MULTIDESTFILES) mismatched = flFrom->dwNumFiles - flTo->dwNumFiles; diff --git a/dlls/shell32/tests/shlfileop.c b/dlls/shell32/tests/shlfileop.c -index d33ad5b..108d65e 100644 +index 273b09d5005..ed1c25a3528 100644 --- a/dlls/shell32/tests/shlfileop.c +++ b/dlls/shell32/tests/shlfileop.c -@@ -2205,13 +2205,13 @@ static void test_move(void) +@@ -2306,13 +2306,13 @@ static void test_move(void) ok(!DeleteFileA("d.txt"), "Expected d.txt to not exist\n"); } @@ -43,9 +44,9 @@ index d33ad5b..108d65e 100644 { - /* Vista and W2K8 (broken or new behavior ?) */ + /* New behavior on Vista or later */ - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(DeleteFileA("dir1\\dir2\\test2.txt"), "Expected dir1\\dir2\\test2.txt to exist\n"); RemoveDirectoryA("dir1\\dir2"); -- -2.5.0 +2.35.1 diff --git a/patches/shell32-SHGetStockIconInfo/0001-shell32-Improve-semi-stub-SHGetStockIconInfo-try-fin.patch b/patches/shell32-SHGetStockIconInfo/0001-shell32-Improve-semi-stub-SHGetStockIconInfo-try-fin.patch index 93e7d6b5..8defce86 100644 --- a/patches/shell32-SHGetStockIconInfo/0001-shell32-Improve-semi-stub-SHGetStockIconInfo-try-fin.patch +++ b/patches/shell32-SHGetStockIconInfo/0001-shell32-Improve-semi-stub-SHGetStockIconInfo-try-fin.patch @@ -1,4 +1,4 @@ -From 71e2a33c1ecf912c000449971bcbae26a7797c6a Mon Sep 17 00:00:00 2001 +From 68d7bcf933fabf684262f42a152ddf4fa5c38577 Mon Sep 17 00:00:00 2001 From: Louis Lenders Date: Fri, 12 Oct 2018 11:57:18 +0200 Subject: [PATCH] shell32: Improve semi-stub SHGetStockIconInfo, try find @@ -18,10 +18,10 @@ Signed-off-by: Louis Lenders 2 files changed, 164 insertions(+), 7 deletions(-) diff --git a/dlls/shell32/iconcache.c b/dlls/shell32/iconcache.c -index a1c91f4785e..48fc5744879 100644 +index 1851d0d0fc6..705b818083c 100644 --- a/dlls/shell32/iconcache.c +++ b/dlls/shell32/iconcache.c -@@ -1020,6 +1020,119 @@ INT WINAPI SHGetIconOverlayIndexW(LPCWSTR pszIconPath, INT iIconIndex) +@@ -1019,6 +1019,119 @@ INT WINAPI SHGetIconOverlayIndexW(LPCWSTR pszIconPath, INT iIconIndex) return -1; } @@ -141,7 +141,7 @@ index a1c91f4785e..48fc5744879 100644 /**************************************************************************** * SHGetStockIconInfo [SHELL32.@] * -@@ -1037,23 +1150,52 @@ INT WINAPI SHGetIconOverlayIndexW(LPCWSTR pszIconPath, INT iIconIndex) +@@ -1036,23 +1149,52 @@ INT WINAPI SHGetIconOverlayIndexW(LPCWSTR pszIconPath, INT iIconIndex) */ HRESULT WINAPI SHGetStockIconInfo(SHSTOCKICONID id, UINT flags, SHSTOCKICONINFO *sii) { @@ -202,23 +202,23 @@ index a1c91f4785e..48fc5744879 100644 return S_OK; diff --git a/dlls/shell32/tests/shelllink.c b/dlls/shell32/tests/shelllink.c -index edd536c3a01..05adcae57b2 100644 +index e4e1e664038..b2e95e5301a 100644 --- a/dlls/shell32/tests/shelllink.c +++ b/dlls/shell32/tests/shelllink.c @@ -1073,6 +1073,21 @@ static void test_SHGetStockIconInfo(void) /* there is a NULL check for the struct */ hr = pSHGetStockIconInfo(SIID_FOLDER, SHGSI_ICONLOCATION, NULL); - ok(hr == E_INVALIDARG, "NULL: got 0x%x\n", hr); + ok(hr == E_INVALIDARG, "NULL: got 0x%lx\n", hr); + + for(i = 0; i < 140; i++) /* highest on wvista, i > 140 gives E_INVALIDARG, win7 can go higher */ + { + memset(buffer, 0, sizeof(buffer)); + sii->cbSize = sizeof(SHSTOCKICONINFO); + hr = pSHGetStockIconInfo(i, SHGSI_ICON | SHGSI_SMALLICON, sii); -+ ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); ++ ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr); + ok(sii->hIcon != NULL, "got NULL, expected an icon handle\n"); + ok(sii->iIcon != 0, "got unexpected 0 for SIID %d\n", i); /* howto find out exact sii->iIcon value??? */ -+ ok(sii->iSysImageIndex == -1, "got %d (expected -1)\n", sii->iSysImageIndex); ++ ok(sii->iSysImageIndex == -1, "got %ld (expected -1)\n", sii->iSysImageIndex); + ok(DestroyIcon(sii->hIcon), "DestroyIcon failed\n"); + if (winetest_debug > 1) + trace("%3d: got iSysImageIndex %3d, iIcon %3d and %s\n", i, sii->iSysImageIndex, @@ -228,5 +228,5 @@ index edd536c3a01..05adcae57b2 100644 static void test_SHExtractIcons(void) -- -2.33.0 +2.35.1 diff --git a/patches/shlwapi-AssocGetPerceivedType/0001-shlwapi-tests-Add-tests-for-AssocGetPerceivedType.patch b/patches/shlwapi-AssocGetPerceivedType/0001-shlwapi-tests-Add-tests-for-AssocGetPerceivedType.patch index 928d977f..a1862452 100644 --- a/patches/shlwapi-AssocGetPerceivedType/0001-shlwapi-tests-Add-tests-for-AssocGetPerceivedType.patch +++ b/patches/shlwapi-AssocGetPerceivedType/0001-shlwapi-tests-Add-tests-for-AssocGetPerceivedType.patch @@ -1,18 +1,18 @@ -From deda2a5bb3b681825c9366574a7d7561600043c7 Mon Sep 17 00:00:00 2001 +From 96ac04f742980583ab06204facb5c9f838acb12c Mon Sep 17 00:00:00 2001 From: Mark Jansen Date: Sat, 2 May 2015 13:47:30 +0200 -Subject: shlwapi/tests: Add tests for AssocGetPerceivedType. +Subject: [PATCH] shlwapi/tests: Add tests for AssocGetPerceivedType. --- dlls/shlwapi/assoc.c | 7 +- - dlls/shlwapi/tests/assoc.c | 283 ++++++++++++++++++++++++++++++++++++++++++++- + dlls/shlwapi/tests/assoc.c | 283 ++++++++++++++++++++++++++++++++++++- 2 files changed, 284 insertions(+), 6 deletions(-) diff --git a/dlls/shlwapi/assoc.c b/dlls/shlwapi/assoc.c -index 3156990..62c101d 100644 +index b4f5b0cf8ce..0fb6e7fcbe8 100644 --- a/dlls/shlwapi/assoc.c +++ b/dlls/shlwapi/assoc.c -@@ -132,10 +132,9 @@ HRESULT WINAPI AssocGetPerceivedType(LPCWSTR lpszExt, PERCEIVED *lpType, +@@ -131,10 +131,9 @@ HRESULT WINAPI AssocGetPerceivedType(LPCWSTR lpszExt, PERCEIVED *lpType, { FIXME("(%s, %p, %p, %p) not supported\n", debugstr_w(lpszExt), lpType, lpFlag, lppszType); @@ -27,17 +27,17 @@ index 3156990..62c101d 100644 /************************************************************************* diff --git a/dlls/shlwapi/tests/assoc.c b/dlls/shlwapi/tests/assoc.c -index cbc40ce..2b4e0ad 100644 +index 84eda1317bb..ffbcea9f028 100644 --- a/dlls/shlwapi/tests/assoc.c +++ b/dlls/shlwapi/tests/assoc.c @@ -23,12 +23,13 @@ #include "shlwapi.h" #include "shlguid.h" --#define expect(expected, got) ok ( expected == got, "Expected %d, got %d\n", expected, got) --#define expect_hr(expected, got) ok ( expected == got, "Expected %08x, got %08x\n", expected, got) -+#define expect(expected, got) ok( (expected) == (got), "Expected %d, got %d\n", (expected), (got)) -+#define expect_hr(expected, got) ok( (expected) == (got), "Expected %08x, got %08x\n", (expected), (got)) +-#define expect(expected, got) ok ( expected == got, "Expected %ld, got %ld\n", expected, got) +-#define expect_hr(expected, got) ok ( expected == got, "Expected %08lx, got %08lx\n", expected, got) ++#define expect(expected, got) ok( (expected) == (got), "Expected %ld, got %ld\n", (expected), (got)) ++#define expect_hr(expected, got) ok( (expected) == (got), "Expected %08lx, got %08lx\n", (expected), (got)) static HRESULT (WINAPI *pAssocQueryStringA)(ASSOCF,ASSOCSTR,LPCSTR,LPCSTR,LPSTR,LPDWORD) = NULL; static HRESULT (WINAPI *pAssocQueryStringW)(ASSOCF,ASSOCSTR,LPCWSTR,LPCWSTR,LPWSTR,LPDWORD) = NULL; @@ -46,7 +46,7 @@ index cbc40ce..2b4e0ad 100644 /* Every version of Windows with IE should have this association? */ static const WCHAR dotHtml[] = { '.','h','t','m','l',0 }; -@@ -304,6 +305,282 @@ static void test_assoc_create(void) +@@ -306,6 +307,282 @@ static void test_assoc_create(void) } } @@ -329,7 +329,7 @@ index cbc40ce..2b4e0ad 100644 START_TEST(assoc) { HMODULE hshlwapi; -@@ -311,9 +588,11 @@ START_TEST(assoc) +@@ -313,9 +590,11 @@ START_TEST(assoc) pAssocQueryStringA = (void*)GetProcAddress(hshlwapi, "AssocQueryStringA"); pAssocQueryStringW = (void*)GetProcAddress(hshlwapi, "AssocQueryStringW"); pAssocCreate = (void*)GetProcAddress(hshlwapi, "AssocCreate"); @@ -342,5 +342,5 @@ index cbc40ce..2b4e0ad 100644 + test_assoc_perceived(); } -- -2.3.7 +2.35.1 diff --git a/patches/shlwapi-UrlCombine/0001-shlwapi-tests-Add-additional-tests-for-UrlCombine-and-.patch b/patches/shlwapi-UrlCombine/0001-shlwapi-tests-Add-additional-tests-for-UrlCombine-and-.patch index abe61417..f1996fe3 100644 --- a/patches/shlwapi-UrlCombine/0001-shlwapi-tests-Add-additional-tests-for-UrlCombine-and-.patch +++ b/patches/shlwapi-UrlCombine/0001-shlwapi-tests-Add-additional-tests-for-UrlCombine-and-.patch @@ -1,4 +1,4 @@ -From 25d11abe74d0f13f34cbc27ce33a1246fcafc0b2 Mon Sep 17 00:00:00 2001 +From e6dac63a0b7a0fa9cde972c7f43ef970f865310f Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Fri, 17 Jan 2014 01:19:41 +0100 Subject: [PATCH] shlwapi/tests: Add additional tests for UrlCombine and @@ -9,10 +9,10 @@ Subject: [PATCH] shlwapi/tests: Add additional tests for UrlCombine and 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/dlls/shlwapi/tests/url.c b/dlls/shlwapi/tests/url.c -index eea254442c6..8e17969d0c5 100644 +index e8284e70d02..bc686c86609 100644 --- a/dlls/shlwapi/tests/url.c +++ b/dlls/shlwapi/tests/url.c -@@ -190,6 +190,14 @@ static const TEST_URL_CANONICALIZE TEST_CANONICALIZE[] = { +@@ -183,6 +183,14 @@ static const TEST_URL_CANONICALIZE TEST_CANONICALIZE[] = { {"./A", URL_DONT_SIMPLIFY, "./A", FALSE}, {"A/./B", 0, "A/B", TRUE}, {"A/../B", 0, "B", TRUE}, @@ -27,7 +27,7 @@ index eea254442c6..8e17969d0c5 100644 {"/uri-res/N2R?urn:sha1:B3K", URL_DONT_ESCAPE_EXTRA_INFO | URL_WININET_COMPATIBILITY /*0x82000000*/, "/uri-res/N2R?urn:sha1:B3K", FALSE} /*LimeWire online installer calls this*/, {"http:www.winehq.org/dir/../index.html", 0, "http:www.winehq.org/index.html"}, {"http://localhost/test.html", URL_FILE_USE_PATHURL, "http://localhost/test.html"}, -@@ -339,6 +347,7 @@ typedef struct _TEST_URL_COMBINE { +@@ -318,6 +326,7 @@ typedef struct _TEST_URL_COMBINE { const char *url2; DWORD flags; const char *expecturl; @@ -35,7 +35,7 @@ index eea254442c6..8e17969d0c5 100644 } TEST_URL_COMBINE; static const TEST_URL_COMBINE TEST_COMBINE[] = { -@@ -1157,7 +1166,7 @@ static void test_UrlCanonicalizeW(void) +@@ -1257,7 +1266,7 @@ static void test_UrlCanonicalizeW(void) /* ########################### */ @@ -44,39 +44,39 @@ index eea254442c6..8e17969d0c5 100644 { HRESULT hr; CHAR szReturnUrl[INTERNET_MAX_URL_LENGTH]; -@@ -1177,17 +1186,28 @@ static void check_url_combine(const char *szUrl1, const char *szUrl2, DWORD dwFl +@@ -1277,17 +1286,28 @@ static void check_url_combine(const char *szUrl1, const char *szUrl2, DWORD dwFl dwSize = 0; hr = UrlCombineA(szUrl1, szUrl2, NULL, &dwSize, dwFlags); - ok(hr == E_POINTER, "Checking length of string, return was 0x%08x, expected 0x%08x\n", hr, E_POINTER); -- ok(dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1); -+ ok(todo || dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1); + ok(hr == E_POINTER, "Checking length of string, return was 0x%08lx, expected 0x%08lx\n", hr, E_POINTER); +- ok(dwSize == dwExpectLen+1, "Got length %ld, expected %ld\n", dwSize, dwExpectLen+1); ++ ok(todo || dwSize == dwExpectLen+1, "Got length %ld, expected %ld\n", dwSize, dwExpectLen+1); dwSize--; hr = UrlCombineA(szUrl1, szUrl2, szReturnUrl, &dwSize, dwFlags); - ok(hr == E_POINTER, "UrlCombineA returned 0x%08x, expected 0x%08x\n", hr, E_POINTER); -- ok(dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1); -+ ok(todo || dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1); + ok(hr == E_POINTER, "UrlCombineA returned 0x%08lx, expected 0x%08lx\n", hr, E_POINTER); +- ok(dwSize == dwExpectLen+1, "Got length %ld, expected %ld\n", dwSize, dwExpectLen+1); ++ ok(todo || dwSize == dwExpectLen+1, "Got length %ld, expected %ld\n", dwSize, dwExpectLen+1); hr = UrlCombineA(szUrl1, szUrl2, szReturnUrl, &dwSize, dwFlags); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); - ok(dwSize == dwExpectLen, "Got length %d, expected %d\n", dwSize, dwExpectLen); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + ok(dwSize == dwExpectLen, "Got length %ld, expected %ld\n", dwSize, dwExpectLen); - ok(!strcmp(szReturnUrl, szExpectUrl), "Expected %s, got %s.\n", szExpectUrl, szReturnUrl); + + if (todo) + { + todo_wine ok(dwSize == dwExpectLen && (FAILED(hr) || strcmp(szReturnUrl, szExpectUrl)==0), -+ "Expected %s (len=%d), but got %s (len=%d)\n", szExpectUrl, dwExpectLen, SUCCEEDED(hr) ? szReturnUrl : "(null)", dwSize); ++ "Expected %s (len=%ld), but got %s (len=%ld)\n", szExpectUrl, dwExpectLen, SUCCEEDED(hr) ? szReturnUrl : "(null)", dwSize); + } + else + { -+ ok(dwSize == dwExpectLen, "Got length %d, expected %d\n", dwSize, dwExpectLen); ++ ok(dwSize == dwExpectLen, "Got length %ld, expected %ld\n", dwSize, dwExpectLen); + if (SUCCEEDED(hr)) + ok(strcmp(szReturnUrl, szExpectUrl)==0, "Expected %s, but got %s\n", szExpectUrl, szReturnUrl); + } dwSize = 0; hr = UrlCombineW(wszUrl1, wszUrl2, NULL, &dwSize, dwFlags); -@@ -1218,7 +1238,7 @@ static void test_UrlCombine(void) +@@ -1318,7 +1338,7 @@ static void test_UrlCombine(void) { unsigned int i; for (i = 0; i < ARRAY_SIZE(TEST_COMBINE); i++) { @@ -86,5 +86,5 @@ index eea254442c6..8e17969d0c5 100644 } -- -2.34.1 +2.35.1 diff --git a/patches/user32-FlashWindowEx/0001-user32-Improve-FlashWindowEx-message-and-return-valu.patch b/patches/user32-FlashWindowEx/0001-user32-Improve-FlashWindowEx-message-and-return-valu.patch index f0d5a0c2..256227e3 100644 --- a/patches/user32-FlashWindowEx/0001-user32-Improve-FlashWindowEx-message-and-return-valu.patch +++ b/patches/user32-FlashWindowEx/0001-user32-Improve-FlashWindowEx-message-and-return-valu.patch @@ -1,18 +1,19 @@ -From ac625fd640ad8d9d48765979370e635b77a580ec Mon Sep 17 00:00:00 2001 +From a295be388db4bbe50867b295d09a57726321261c Mon Sep 17 00:00:00 2001 From: James Coonradt Date: Tue, 19 Sep 2017 12:28:50 -0600 Subject: [PATCH] user32: Improve FlashWindowEx message and return value. --- dlls/user32/tests/win.c | 4 ++-- - dlls/user32/win.c | 5 ++--- - 2 files changed, 4 insertions(+), 5 deletions(-) + dlls/user32/win.c | 1 - + dlls/win32u/window.c | 5 ++--- + 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c -index 29fdc56ecca..49e5b824806 100644 +index 496c3f9ab07..2718d4c96c9 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c -@@ -9820,7 +9820,7 @@ static void test_FlashWindowEx(void) +@@ -9825,7 +9825,7 @@ static void test_FlashWindowEx(void) SetLastError(0xdeadbeef); ret = pFlashWindowEx(&finfo); @@ -21,7 +22,7 @@ index 29fdc56ecca..49e5b824806 100644 finfo.cbSize = sizeof(FLASHWINFO) - 1; SetLastError(0xdeadbeef); -@@ -9871,7 +9871,7 @@ static void test_FlashWindowEx(void) +@@ -9876,7 +9876,7 @@ static void test_FlashWindowEx(void) finfo.dwFlags = FLASHW_STOP; SetLastError(0xdeadbeef); ret = pFlashWindowEx(&finfo); @@ -30,26 +31,26 @@ index 29fdc56ecca..49e5b824806 100644 DestroyWindow( hwnd ); } -diff --git a/dlls/user32/win.c b/dlls/user32/win.c -index 1a037297ac1..b79e942ee46 100644 ---- a/dlls/user32/win.c -+++ b/dlls/user32/win.c -@@ -3842,13 +3842,12 @@ BOOL WINAPI FlashWindowEx( PFLASHWINFO pfinfo ) - if (!wndPtr || wndPtr == WND_OTHER_PROCESS || wndPtr == WND_DESKTOP) return FALSE; - hwnd = wndPtr->obj.handle; /* make it a full handle */ +diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c +index 1e36e48aded..fd4be68084b 100644 +--- a/dlls/win32u/window.c ++++ b/dlls/win32u/window.c +@@ -1862,13 +1862,12 @@ BOOL WINAPI NtUserFlashWindowEx( FLASHWINFO *info ) + if (!win || win == WND_OTHER_PROCESS || win == WND_DESKTOP) return FALSE; + hwnd = win->obj.handle; /* make it a full handle */ -- if (pfinfo->dwFlags) wparam = !(wndPtr->flags & WIN_NCACTIVATED); +- if (info->dwFlags) wparam = !(win->flags & WIN_NCACTIVATED); - else wparam = (hwnd == NtUserGetForegroundWindow()); -+ wparam = (wndPtr->flags & WIN_NCACTIVATED) != 0; ++ wparam = (win->flags & WIN_NCACTIVATED) != 0; - WIN_ReleasePtr( wndPtr ); - SendMessageW( hwnd, WM_NCACTIVATE, wparam, 0 ); - USER_Driver->pFlashWindowEx( pfinfo ); + release_win_ptr( win ); + send_message( hwnd, WM_NCACTIVATE, wparam, 0 ); + user_driver->pFlashWindowEx( info ); - return wparam; -+ return (pfinfo->dwFlags & FLASHW_CAPTION) ? TRUE : wparam; ++ return (info->dwFlags & FLASHW_CAPTION) ? TRUE : wparam; } } -- -2.34.1 +2.35.1 diff --git a/patches/user32-message-order/0001-user32-Fix-messages-sent-on-a-window-without-WS_CHIL.patch b/patches/user32-message-order/0001-user32-Fix-messages-sent-on-a-window-without-WS_CHIL.patch index 8ca94435..42548c2e 100644 --- a/patches/user32-message-order/0001-user32-Fix-messages-sent-on-a-window-without-WS_CHIL.patch +++ b/patches/user32-message-order/0001-user32-Fix-messages-sent-on-a-window-without-WS_CHIL.patch @@ -1,4 +1,4 @@ -From f71bf1dbfced899bffb9f5baf0015f82779f81b8 Mon Sep 17 00:00:00 2001 +From 93abf7b468f93d525ef47754737496a11facaec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Iv=C4=83ncescu?= Date: Wed, 16 Sep 2020 17:35:09 +0300 Subject: [PATCH] user32: Fix messages sent on a window without WS_CHILD, but @@ -22,10 +22,10 @@ Signed-off-by: Gabriel Ivăncescu 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c -index d61c813b492..92076573b90 100644 +index c6f2bc38c6c..9164f57fdc2 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c -@@ -16796,6 +16796,7 @@ static const struct message WmSetParentSeq_2[] = { +@@ -17117,6 +17117,7 @@ static const struct message WmSetParentSeq_2[] = { { HCBT_ACTIVATE, hook|optional }, { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, @@ -33,7 +33,7 @@ index d61c813b492..92076573b90 100644 { WM_NCACTIVATE, sent|wparam|optional, 1 }, { WM_ACTIVATE, sent|wparam|optional, 1 }, { HCBT_SETFOCUS, hook|optional }, -@@ -16866,7 +16867,7 @@ static void test_SetParent(void) +@@ -17187,7 +17188,7 @@ static void test_SetParent(void) SetParent(popup, child); flush_events(); @@ -43,34 +43,34 @@ index d61c813b492..92076573b90 100644 ok(GetWindowLongA(popup, GWL_STYLE) & WS_VISIBLE, "WS_VISIBLE should be set\n"); ok(!IsWindowVisible(popup), "IsWindowVisible() should return FALSE\n"); diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c -index fa2f7e6fede..5d9401f13a4 100644 +index 3238d0c1b50..b0a4fac958a 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c -@@ -1144,8 +1144,8 @@ static BOOL show_window( HWND hwnd, INT cmd ) +@@ -1029,8 +1029,8 @@ static BOOL show_window( HWND hwnd, INT cmd ) } swp = new_swp; -- parent = GetAncestor( hwnd, GA_PARENT ); +- parent = NtUserGetAncestor( hwnd, GA_PARENT ); - if (parent && !IsWindowVisible( parent ) && !(swp & SWP_STATECHANGED)) -+ if ((style & WS_CHILD) && (parent = GetAncestor( hwnd, GA_PARENT )) && ++ if ((style & WS_CHILD) && (parent = NtUserGetAncestor( hwnd, GA_PARENT )) && + !IsWindowVisible( parent ) && !(swp & SWP_STATECHANGED)) { /* if parent is not visible simply toggle WS_VISIBLE and return */ if (showFlag) WIN_SetStyle( hwnd, WS_VISIBLE, 0 ); -@@ -2042,8 +2042,11 @@ static BOOL fixup_flags( WINDOWPOS *winpos, const RECT *old_window_rect, int par +@@ -1849,8 +1849,11 @@ static BOOL fixup_flags( WINDOWPOS *winpos, const RECT *old_window_rect, int par if (winpos->cy < 0) winpos->cy = 0; else if (winpos->cy > 32767) winpos->cy = 32767; -- parent = GetAncestor( winpos->hwnd, GA_PARENT ); +- parent = NtUserGetAncestor( winpos->hwnd, GA_PARENT ); - if (!IsWindowVisible( parent )) winpos->flags |= SWP_NOREDRAW; + if (wndPtr->dwStyle & WS_CHILD) + { -+ parent = GetAncestor( winpos->hwnd, GA_PARENT ); ++ parent = NtUserGetAncestor( winpos->hwnd, GA_PARENT ); + if (!IsWindowVisible( parent )) winpos->flags |= SWP_NOREDRAW; + } if (wndPtr->dwStyle & WS_VISIBLE) winpos->flags &= ~SWP_SHOWWINDOW; else -- -2.33.0 +2.35.1 diff --git a/patches/user32-recursive-activation/0001-user32-focus-Prevent-a-recursive-loop-with-the-activ.patch b/patches/user32-recursive-activation/0001-user32-focus-Prevent-a-recursive-loop-with-the-activ.patch index 3d37ea54..aafec4a9 100644 --- a/patches/user32-recursive-activation/0001-user32-focus-Prevent-a-recursive-loop-with-the-activ.patch +++ b/patches/user32-recursive-activation/0001-user32-focus-Prevent-a-recursive-loop-with-the-activ.patch @@ -1,4 +1,4 @@ -From 8997ff8b93a64bd2d0db463b6789d05dc5a5fbb5 Mon Sep 17 00:00:00 2001 +From f0e7e4d7995867911e47dc54c9087cd7a57b5c90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Iv=C4=83ncescu?= Date: Mon, 22 Jul 2019 15:29:25 +0300 Subject: [PATCH] user32/focus: Prevent a recursive loop with the activation @@ -15,103 +15,24 @@ actually depend on this behavior, so it is needed. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46274 Signed-off-by: Gabriel Ivăncescu --- - dlls/user32/focus.c | 44 +++++++++++++++++++++++++++-------------- - dlls/user32/tests/msg.c | 2 +- - dlls/user32/win.h | 1 + - 3 files changed, 31 insertions(+), 16 deletions(-) + dlls/user32/focus.c | 1 - + dlls/user32/tests/msg.c | 2 +- + dlls/win32u/input.c | 52 +++++++++++++++++++++++++++--------- + dlls/win32u/ntuser_private.h | 1 + + 4 files changed, 41 insertions(+), 15 deletions(-) diff --git a/dlls/user32/focus.c b/dlls/user32/focus.c -index a5fc376bdc6..cae559270bf 100644 +index 4998ac2feb6..f68c6080698 100644 --- a/dlls/user32/focus.c +++ b/dlls/user32/focus.c -@@ -89,7 +89,7 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus ) - { - HWND previous = GetActiveWindow(); - BOOL ret; -- DWORD old_thread, new_thread; -+ DWORD winflags, old_thread, new_thread; - CBTACTIVATESTRUCT cbt; +@@ -31,7 +31,6 @@ + #include "user_private.h" + #include "wine/server.h" - if (previous == hwnd) -@@ -98,16 +98,24 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus ) - return TRUE; - } - -- /* call CBT hook chain */ -- cbt.fMouse = mouse; -- cbt.hWndActive = previous; -- if (HOOK_CallHooks( WH_CBT, HCBT_ACTIVATE, (WPARAM)hwnd, (LPARAM)&cbt, TRUE )) return FALSE; - -- if (IsWindow(previous)) -+ /* Prevent a recursive activation loop with the activation messages */ -+ winflags = win_set_flags(hwnd, WIN_IS_IN_ACTIVATION, 0); -+ if (!(winflags & WIN_IS_IN_ACTIVATION)) - { -- SendMessageW( previous, WM_NCACTIVATE, FALSE, (LPARAM)hwnd ); -- SendMessageW( previous, WM_ACTIVATE, -- MAKEWPARAM( WA_INACTIVE, IsIconic(previous) ), (LPARAM)hwnd ); -+ ret = FALSE; -+ -+ /* call CBT hook chain */ -+ cbt.fMouse = mouse; -+ cbt.hWndActive = previous; -+ if (HOOK_CallHooks( WH_CBT, HCBT_ACTIVATE, (WPARAM)hwnd, (LPARAM)&cbt, TRUE )) -+ goto clear_flags; -+ -+ if (IsWindow(previous)) -+ { -+ SendMessageW( previous, WM_NCACTIVATE, FALSE, (LPARAM)hwnd ); -+ SendMessageW( previous, WM_ACTIVATE, -+ MAKEWPARAM( WA_INACTIVE, IsIconic(previous) ), (LPARAM)hwnd ); -+ } - } - - SERVER_START_REQ( set_active_window ) -@@ -117,9 +125,9 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus ) - previous = wine_server_ptr_handle( reply->previous ); - } - SERVER_END_REQ; -- if (!ret) return FALSE; -+ if (!ret) goto clear_flags; - if (prev) *prev = previous; -- if (previous == hwnd) return TRUE; -+ if (previous == hwnd) goto clear_flags; - - if (hwnd) - { -@@ -127,7 +135,11 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus ) - if (SendMessageW( hwnd, WM_QUERYNEWPALETTE, 0, 0 )) - SendMessageTimeoutW( HWND_BROADCAST, WM_PALETTEISCHANGING, (WPARAM)hwnd, 0, - SMTO_ABORTIFHUNG, 2000, NULL ); -- if (!IsWindow(hwnd)) return FALSE; -+ if (!IsWindow(hwnd)) -+ { -+ ret = FALSE; -+ goto clear_flags; -+ } - } - - old_thread = previous ? GetWindowThreadProcessId( previous, NULL ) : 0; -@@ -159,7 +171,7 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus ) - } - } - -- if (IsWindow(hwnd)) -+ if (!(winflags & WIN_IS_IN_ACTIVATION) && IsWindow(hwnd)) - { - SendMessageW( hwnd, WM_NCACTIVATE, hwnd == NtUserGetForegroundWindow(), (LPARAM)previous ); - SendMessageW( hwnd, WM_ACTIVATE, -@@ -184,7 +196,9 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus ) - } - } - -- return TRUE; -+clear_flags: -+ win_set_flags(hwnd, 0, WIN_IS_IN_ACTIVATION); -+ return ret; - } - - + /******************************************************************* + * FOCUS_MouseActivate + * diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 9164f57fdc2..01cb214acdf 100644 --- a/dlls/user32/tests/msg.c @@ -125,18 +46,117 @@ index 9164f57fdc2..01cb214acdf 100644 flush_sequence(); if (GetWindowLongW( hwnd, GWL_STYLE ) & WS_MINIMIZE) -diff --git a/dlls/user32/win.h b/dlls/user32/win.h -index 1f51fd63314..a64cc66be5a 100644 ---- a/dlls/user32/win.h -+++ b/dlls/user32/win.h -@@ -79,6 +79,7 @@ typedef struct tagWND +diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c +index fff732097ba..cbc6cfd6b0d 100644 +--- a/dlls/win32u/input.c ++++ b/dlls/win32u/input.c +@@ -1180,6 +1180,18 @@ static HWND set_focus_window( HWND hwnd ) + return previous; + } + ++static UINT win_set_flags( HWND hwnd, UINT set_mask, UINT clear_mask ) ++{ ++ UINT ret; ++ WND *ptr = get_win_ptr( hwnd ); ++ ++ if (!ptr || ptr == WND_OTHER_PROCESS || ptr == WND_DESKTOP) return 0; ++ ret = ptr->flags; ++ ptr->flags = (ret & ~clear_mask) | set_mask; ++ release_win_ptr( ptr ); ++ return ret; ++} ++ + /******************************************************************* + * set_active_window + */ +@@ -1187,7 +1199,7 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus ) + { + HWND previous = get_active_window(); + BOOL ret; +- DWORD old_thread, new_thread; ++ DWORD winflags, old_thread, new_thread; + CBTACTIVATESTRUCT cbt; + + if (previous == hwnd) +@@ -1196,16 +1208,24 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus ) + return TRUE; + } + +- /* call CBT hook chain */ +- cbt.fMouse = mouse; +- cbt.hWndActive = previous; +- if (call_hooks( WH_CBT, HCBT_ACTIVATE, (WPARAM)hwnd, (LPARAM)&cbt, TRUE )) return FALSE; +- +- if (is_window( previous )) ++ /* Prevent a recursive activation loop with the activation messages */ ++ winflags = win_set_flags(hwnd, WIN_IS_IN_ACTIVATION, 0); ++ if (!(winflags & WIN_IS_IN_ACTIVATION)) + { +- send_message( previous, WM_NCACTIVATE, FALSE, (LPARAM)hwnd ); +- send_message( previous, WM_ACTIVATE, +- MAKEWPARAM( WA_INACTIVE, is_iconic(previous) ), (LPARAM)hwnd ); ++ ret = FALSE; ++ ++ /* call CBT hook chain */ ++ cbt.fMouse = mouse; ++ cbt.hWndActive = previous; ++ if (call_hooks( WH_CBT, HCBT_ACTIVATE, (WPARAM)hwnd, (LPARAM)&cbt, TRUE )) ++ goto clear_flags; ++ ++ if (is_window(previous)) ++ { ++ send_message( previous, WM_NCACTIVATE, FALSE, (LPARAM)hwnd ); ++ send_message( previous, WM_ACTIVATE, ++ MAKEWPARAM( WA_INACTIVE, is_iconic(previous) ), (LPARAM)hwnd ); ++ } + } + + SERVER_START_REQ( set_active_window ) +@@ -1225,7 +1245,11 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus ) + if (send_message( hwnd, WM_QUERYNEWPALETTE, 0, 0 ) && user_callbacks) + user_callbacks->pSendMessageTimeoutW( HWND_BROADCAST, WM_PALETTEISCHANGING, (WPARAM)hwnd, 0, + SMTO_ABORTIFHUNG, 2000, NULL ); +- if (!is_window(hwnd)) return FALSE; ++ if (!is_window(hwnd)) ++ { ++ ret = FALSE; ++ goto clear_flags; ++ } + } + + old_thread = previous ? get_window_thread( previous, NULL ) : 0; +@@ -1257,7 +1281,7 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus ) + } + } + +- if (is_window(hwnd)) ++ if (!(winflags & WIN_IS_IN_ACTIVATION) && is_window(hwnd)) + { + send_message( hwnd, WM_NCACTIVATE, hwnd == NtUserGetForegroundWindow(), (LPARAM)previous ); + send_message( hwnd, WM_ACTIVATE, +@@ -1282,7 +1306,9 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus ) + } + } + +- return TRUE; ++clear_flags: ++ win_set_flags(hwnd, 0, WIN_IS_IN_ACTIVATION); ++ return ret; + } + + /********************************************************************** +diff --git a/dlls/win32u/ntuser_private.h b/dlls/win32u/ntuser_private.h +index 6c10a3e77e1..b46f0426368 100644 +--- a/dlls/win32u/ntuser_private.h ++++ b/dlls/win32u/ntuser_private.h +@@ -109,6 +109,7 @@ typedef struct tagWND #define WIN_NEEDS_SHOW_OWNEDPOPUP 0x0020 /* WM_SHOWWINDOW:SC_SHOW must be sent in the next ShowOwnedPopup call */ #define WIN_CHILDREN_MOVED 0x0040 /* children may have moved, ignore stored positions */ #define WIN_HAS_IME_WIN 0x0080 /* the window has been registered with imm32 */ +#define WIN_IS_IN_ACTIVATION 0x0100 /* the window is in an activation process */ - /* Window functions */ - extern HWND get_hwnd_message_parent(void) DECLSPEC_HIDDEN; + #define WND_OTHER_PROCESS ((WND *)1) /* returned by WIN_GetPtr on unknown window handles */ + #define WND_DESKTOP ((WND *)2) /* returned by WIN_GetPtr on the desktop window */ -- -2.34.1 +2.35.1 diff --git a/patches/uxtheme-CloseThemeClass/0001-uxtheme-Protect-CloseThemeData-from-invalid-input.patch b/patches/uxtheme-CloseThemeClass/0001-uxtheme-Protect-CloseThemeData-from-invalid-input.patch index 45382351..76c7683a 100644 --- a/patches/uxtheme-CloseThemeClass/0001-uxtheme-Protect-CloseThemeData-from-invalid-input.patch +++ b/patches/uxtheme-CloseThemeClass/0001-uxtheme-Protect-CloseThemeData-from-invalid-input.patch @@ -1,4 +1,4 @@ -From 8c7a7c6ba3e1a7752bd0bb5d58e01cc7c3475c88 Mon Sep 17 00:00:00 2001 +From ef1c68c88caa4b4edfce72ad7fed38a4e23a56d1 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Fri, 18 Nov 2016 22:31:29 +0800 Subject: [PATCH] uxtheme: Protect CloseThemeData() from invalid input. @@ -14,7 +14,7 @@ Testcase by Michael Müller . 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/dlls/uxtheme/msstyles.c b/dlls/uxtheme/msstyles.c -index ed22d923250..21106a5f8e0 100644 +index 9e5a79a1c69..18c675214d9 100644 --- a/dlls/uxtheme/msstyles.c +++ b/dlls/uxtheme/msstyles.c @@ -32,6 +32,7 @@ @@ -25,7 +25,7 @@ index ed22d923250..21106a5f8e0 100644 #include "wine/debug.h" #include "wine/heap.h" -@@ -48,6 +49,8 @@ static HRESULT MSSTYLES_GetFont (LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPC +@@ -49,6 +50,8 @@ static HRESULT MSSTYLES_GetFont (LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPC #define MSSTYLES_VERSION 0x0003 @@ -34,7 +34,7 @@ index ed22d923250..21106a5f8e0 100644 static PTHEME_FILE tfActiveTheme; /***********************************************************************/ -@@ -203,6 +206,7 @@ void MSSTYLES_CloseThemeFile(PTHEME_FILE tf) +@@ -204,6 +207,7 @@ void MSSTYLES_CloseThemeFile(PTHEME_FILE tf) pcls->partstate = ps->next; heap_free(ps); } @@ -42,7 +42,7 @@ index ed22d923250..21106a5f8e0 100644 heap_free(pcls); } } -@@ -431,6 +435,7 @@ static PTHEME_CLASS MSSTYLES_AddClass(PTHEME_FILE tf, LPCWSTR pszAppName, LPCWST +@@ -442,6 +446,7 @@ static PTHEME_CLASS MSSTYLES_AddClass(PTHEME_FILE tf, LPCWSTR pszAppName, LPCWST if(cur) return cur; cur = heap_alloc(sizeof(*cur)); @@ -50,7 +50,7 @@ index ed22d923250..21106a5f8e0 100644 cur->hTheme = tf->hTheme; lstrcpyW(cur->szAppName, pszAppName); lstrcpyW(cur->szClassName, pszClassName); -@@ -1022,6 +1027,23 @@ PTHEME_CLASS MSSTYLES_OpenThemeClass(LPCWSTR pszAppName, LPCWSTR pszClassList) +@@ -1075,6 +1080,23 @@ PTHEME_CLASS MSSTYLES_OpenThemeClass(LPCWSTR pszAppName, LPCWSTR pszClassList, U */ HRESULT MSSTYLES_CloseThemeClass(PTHEME_CLASS tc) { @@ -75,7 +75,7 @@ index ed22d923250..21106a5f8e0 100644 return S_OK; } diff --git a/dlls/uxtheme/msstyles.h b/dlls/uxtheme/msstyles.h -index 0b7e1ab35cc..ba10ac82b82 100644 +index 67f81315d7a..9a65b7cb8a7 100644 --- a/dlls/uxtheme/msstyles.h +++ b/dlls/uxtheme/msstyles.h @@ -49,6 +49,7 @@ typedef struct _THEME_PARTSTATE { @@ -86,7 +86,7 @@ index 0b7e1ab35cc..ba10ac82b82 100644 HMODULE hTheme; struct _THEME_FILE* tf; WCHAR szAppName[MAX_THEME_APP_NAME]; -@@ -63,7 +64,7 @@ typedef struct _THEME_IMAGE { +@@ -64,7 +65,7 @@ typedef struct _THEME_IMAGE { WCHAR name[MAX_PATH]; HBITMAP image; BOOL hasAlpha; @@ -96,11 +96,11 @@ index 0b7e1ab35cc..ba10ac82b82 100644 } THEME_IMAGE, *PTHEME_IMAGE; diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c -index 869dbe2cdc9..f5097012a2d 100644 +index 93b6f1aa8f7..2e3a323f96c 100644 --- a/dlls/uxtheme/tests/system.c +++ b/dlls/uxtheme/tests/system.c -@@ -195,6 +195,10 @@ static void test_OpenThemeData(void) - ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08x, got 0x%08x\n", +@@ -528,6 +528,10 @@ static void test_OpenThemeData(void) + ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08lx, got 0x%08lx\n", E_PROP_ID_UNSUPPORTED, GetLastError() ); + /* Close invalid handle */ @@ -111,5 +111,5 @@ index 869dbe2cdc9..f5097012a2d 100644 { SetLastError(0xdeadbeef); -- -2.30.2 +2.35.1 diff --git a/patches/windows.networking.connectivity-new-dll/0001-include-Add-windows.networking.connectivity.idl.patch b/patches/windows.networking.connectivity-new-dll/0001-include-Add-windows.networking.connectivity.idl.patch index c64042f5..fa60edba 100644 --- a/patches/windows.networking.connectivity-new-dll/0001-include-Add-windows.networking.connectivity.idl.patch +++ b/patches/windows.networking.connectivity-new-dll/0001-include-Add-windows.networking.connectivity.idl.patch @@ -1,4 +1,4 @@ -From 0a8b258346219cd9cfd85fe906a5f758a5921d2a Mon Sep 17 00:00:00 2001 +From a5a328146b516516e027e52ffa1b0ecc88d85ac3 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Fri, 28 May 2021 12:34:37 +1000 Subject: [PATCH] include: Add windows.networking.connectivity.idl @@ -10,20 +10,20 @@ Subject: [PATCH] include: Add windows.networking.connectivity.idl create mode 100644 include/windows.networking.connectivity.idl diff --git a/include/Makefile.in b/include/Makefile.in -index ae551abd4c0..e9f0fb84070 100644 +index 3492df997d1..77879b77dfd 100644 --- a/include/Makefile.in +++ b/include/Makefile.in -@@ -790,6 +790,7 @@ SOURCES = \ +@@ -796,6 +796,7 @@ SOURCES = \ windows.media.idl \ windows.media.speechrecognition.idl \ windows.media.speechsynthesis.idl \ + windows.networking.connectivity.idl \ windows.storage.streams.idl \ windows.system.idl \ - windows.system.userprofile.idl \ + windows.system.power.idl \ diff --git a/include/windows.networking.connectivity.idl b/include/windows.networking.connectivity.idl new file mode 100644 -index 00000000000..3061512bd1a +index 00000000000..3ccefca02fa --- /dev/null +++ b/include/windows.networking.connectivity.idl @@ -0,0 +1,368 @@ @@ -396,5 +396,5 @@ index 00000000000..3061512bd1a + } +} -- -2.34.1 +2.35.1 diff --git a/patches/wined3d-zero-inf-shaders/0001-wined3d-Add-a-setting-to-workaround-0-inf-problem-in.patch b/patches/wined3d-zero-inf-shaders/0001-wined3d-Add-a-setting-to-workaround-0-inf-problem-in.patch index 37710082..cb5e336d 100644 --- a/patches/wined3d-zero-inf-shaders/0001-wined3d-Add-a-setting-to-workaround-0-inf-problem-in.patch +++ b/patches/wined3d-zero-inf-shaders/0001-wined3d-Add-a-setting-to-workaround-0-inf-problem-in.patch @@ -1,4 +1,4 @@ -From f6926d9da4c948243bf9b77da073f0be73d9c1f3 Mon Sep 17 00:00:00 2001 +From fe189703f5fd934e96f986dce72af6a84c4303ce Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Mon, 9 Sep 2019 18:48:43 +0300 Subject: [PATCH] wined3d: Add a setting to workaround 0 * inf problem in @@ -15,10 +15,10 @@ Signed-off-by: Paul Gofman 3 files changed, 135 insertions(+), 24 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c -index 7c4530f7064..5cccd31207b 100644 +index f7f09d73538..75a88aac6ef 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c -@@ -2305,6 +2305,19 @@ static void shader_generate_glsl_declarations(const struct wined3d_context_gl *c +@@ -2407,6 +2407,19 @@ static void shader_generate_glsl_declarations(const struct wined3d_context_gl *c if (wined3d_settings.strict_shader_math) shader_addline(buffer, "#pragma optionNV(fastmath off)\n"); @@ -38,7 +38,7 @@ index 7c4530f7064..5cccd31207b 100644 prefix = shader_glsl_get_prefix(version->type); /* Prototype the subroutines */ -@@ -3880,7 +3893,12 @@ static void shader_glsl_binop(const struct wined3d_shader_instruction *ins) +@@ -3997,7 +4010,12 @@ static void shader_glsl_binop(const struct wined3d_shader_instruction *ins) write_mask = shader_glsl_append_dst(buffer, ins); shader_glsl_add_src_param(ins, &ins->src[0], write_mask, &src0_param); shader_glsl_add_src_param(ins, &ins->src[1], write_mask, &src1_param); @@ -52,7 +52,7 @@ index 7c4530f7064..5cccd31207b 100644 } static void shader_glsl_relop(const struct wined3d_shader_instruction *ins) -@@ -4093,26 +4111,45 @@ static void shader_glsl_dot(const struct wined3d_shader_instruction *ins) +@@ -4210,26 +4228,45 @@ static void shader_glsl_dot(const struct wined3d_shader_instruction *ins) struct glsl_src_param src0_param; struct glsl_src_param src1_param; DWORD dst_write_mask, src_write_mask; @@ -104,7 +104,7 @@ index 7c4530f7064..5cccd31207b 100644 } } -@@ -4148,10 +4185,15 @@ static void shader_glsl_cut(const struct wined3d_shader_instruction *ins) +@@ -4265,10 +4302,15 @@ static void shader_glsl_cut(const struct wined3d_shader_instruction *ins) static void shader_glsl_pow(const struct wined3d_shader_instruction *ins) { struct wined3d_string_buffer *buffer = ins->ctx->buffer; @@ -120,7 +120,7 @@ index 7c4530f7064..5cccd31207b 100644 dst_write_mask = shader_glsl_append_dst(buffer, ins); dst_size = shader_glsl_get_write_mask_size(dst_write_mask); -@@ -4161,13 +4203,33 @@ static void shader_glsl_pow(const struct wined3d_shader_instruction *ins) +@@ -4278,13 +4320,33 @@ static void shader_glsl_pow(const struct wined3d_shader_instruction *ins) if (dst_size > 1) { @@ -158,7 +158,7 @@ index 7c4530f7064..5cccd31207b 100644 } } -@@ -4345,11 +4407,15 @@ static void shader_glsl_scalar_op(const struct wined3d_shader_instruction *ins) +@@ -4462,11 +4524,15 @@ static void shader_glsl_scalar_op(const struct wined3d_shader_instruction *ins) { DWORD shader_version = WINED3D_SHADER_VERSION(ins->ctx->reg_maps->shader_version.major, ins->ctx->reg_maps->shader_version.minor); @@ -175,7 +175,7 @@ index 7c4530f7064..5cccd31207b 100644 dst_write_mask = shader_glsl_append_dst(buffer, ins); dst_size = shader_glsl_get_write_mask_size(dst_write_mask); -@@ -4359,41 +4425,78 @@ static void shader_glsl_scalar_op(const struct wined3d_shader_instruction *ins) +@@ -4476,41 +4542,78 @@ static void shader_glsl_scalar_op(const struct wined3d_shader_instruction *ins) shader_glsl_add_src_param(ins, &ins->src[0], dst_write_mask, &src0_param); @@ -264,7 +264,7 @@ index 7c4530f7064..5cccd31207b 100644 } /** Process the WINED3DSIO_EXPP instruction in GLSL: -@@ -4710,8 +4813,13 @@ static void shader_glsl_mad(const struct wined3d_shader_instruction *ins) +@@ -4827,8 +4930,13 @@ static void shader_glsl_mad(const struct wined3d_shader_instruction *ins) shader_glsl_add_src_param(ins, &ins->src[0], write_mask, &src0_param); shader_glsl_add_src_param(ins, &ins->src[1], write_mask, &src1_param); shader_glsl_add_src_param(ins, &ins->src[2], write_mask, &src2_param); @@ -281,23 +281,23 @@ index 7c4530f7064..5cccd31207b 100644 /* Handles transforming all WINED3DSIO_M?x? opcodes for diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c -index 6e93b8dc683..5f6adab19ed 100644 +index 524dc7508f9..1168b0ccb8d 100644 --- a/dlls/wined3d/wined3d_main.c +++ b/dlls/wined3d/wined3d_main.c -@@ -364,6 +364,8 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL) - } - if (!get_config_key_dword(hkey, appkey, "strict_shader_math", &wined3d_settings.strict_shader_math)) +@@ -421,6 +421,8 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL) ERR_(winediag)("Setting strict shader math to %#x.\n", wined3d_settings.strict_shader_math); -+ if (!get_config_key_dword(hkey, appkey, "multiply_special", &wined3d_settings.multiply_special)) -+ ERR_(winediag)("Setting multiply special to %#x.\n", wined3d_settings.multiply_special); - if (!get_config_key_dword(hkey, appkey, "MaxShaderModelVS", &wined3d_settings.max_sm_vs)) + if (!get_config_key_dword(hkey, appkey, env, "MaxShaderModelVS", &wined3d_settings.max_sm_vs)) TRACE("Limiting VS shader model to %u.\n", wined3d_settings.max_sm_vs); - if (!get_config_key_dword(hkey, appkey, "MaxShaderModelHS", &wined3d_settings.max_sm_hs)) ++ if (!get_config_key_dword(hkey, appkey, env, "multiply_special", &wined3d_settings.multiply_special)) ++ ERR_(winediag)("Setting multiply special to %#x.\n", wined3d_settings.multiply_special); + if (!get_config_key_dword(hkey, appkey, env, "MaxShaderModelHS", &wined3d_settings.max_sm_hs)) + TRACE("Limiting HS shader model to %u.\n", wined3d_settings.max_sm_hs); + if (!get_config_key_dword(hkey, appkey, env, "MaxShaderModelDS", &wined3d_settings.max_sm_ds)) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index 7b646179a02..a2adace35f7 100644 +index 2b84a6070fb..c031e6fe8b6 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -474,6 +474,7 @@ struct wined3d_settings +@@ -469,6 +469,7 @@ struct wined3d_settings unsigned int sample_count; BOOL check_float_constants; unsigned int strict_shader_math; @@ -306,5 +306,5 @@ index 7b646179a02..a2adace35f7 100644 unsigned int max_sm_hs; unsigned int max_sm_ds; -- -2.30.2 +2.35.1 diff --git a/patches/winex11-CandidateWindowPos/0001-winex11.drv-Update-a-candidate-window-s-position-wit.patch b/patches/winex11-CandidateWindowPos/0001-winex11.drv-Update-a-candidate-window-s-position-wit.patch index 11aeaf93..ac4853fc 100644 --- a/patches/winex11-CandidateWindowPos/0001-winex11.drv-Update-a-candidate-window-s-position-wit.patch +++ b/patches/winex11-CandidateWindowPos/0001-winex11.drv-Update-a-candidate-window-s-position-wit.patch @@ -1,4 +1,4 @@ -From 11c77aff12c68d21157e54cf26c81032a20bc4eb Mon Sep 17 00:00:00 2001 +From 7cacbda4b7462a3a016437bb885a33d2d5589cd7 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Tue, 23 Sep 2014 23:22:17 +0800 Subject: [PATCH] winex11.drv: Update a candidate window's position with @@ -56,11 +56,11 @@ index 2da7e02ca1a..1dd3ff29de4 100644 } return ret; diff --git a/dlls/user32/driver.c b/dlls/user32/driver.c -index 56637b613e9..946ed37a76e 100644 +index 56148448560..f86e3ff1f7f 100644 --- a/dlls/user32/driver.c +++ b/dlls/user32/driver.c -@@ -294,6 +294,11 @@ static BOOL CDECL loaderdrv_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDW - return load_driver()->pUpdateLayeredWindow( hwnd, info, window_rect ); +@@ -169,6 +169,11 @@ static void CDECL loaderdrv_GetDC( HDC hdc, HWND hwnd, HWND top_win, const RECT + load_driver()->pGetDC( hdc, hwnd, top_win, win_rect, top_rect, flags ); } +static void CDECL loaderdrv_UpdateCandidatePos( HWND hwnd, const RECT *caret_rect ) @@ -71,7 +71,7 @@ index 56637b613e9..946ed37a76e 100644 static struct user_driver_funcs lazy_load_driver = { { NULL }, -@@ -348,6 +353,8 @@ static struct user_driver_funcs lazy_load_driver = +@@ -223,6 +228,8 @@ static struct user_driver_funcs lazy_load_driver = NULL, /* opengl support */ NULL, @@ -81,10 +81,10 @@ index 56637b613e9..946ed37a76e 100644 NULL, }; diff --git a/dlls/win32u/driver.c b/dlls/win32u/driver.c -index 67a051f59f1..73e77b7c2c1 100644 +index ed686405e73..0cc6e36f47d 100644 --- a/dlls/win32u/driver.c +++ b/dlls/win32u/driver.c -@@ -917,6 +917,7 @@ static BOOL CDECL nulldrv_SystemParametersInfo( UINT action, UINT int_param, voi +@@ -914,6 +914,7 @@ static BOOL CDECL nulldrv_SystemParametersInfo( UINT action, UINT int_param, voi return FALSE; } @@ -92,7 +92,7 @@ index 67a051f59f1..73e77b7c2c1 100644 static const struct vulkan_funcs * CDECL nulldrv_wine_get_vulkan_driver( UINT version ) { return NULL; -@@ -927,6 +928,11 @@ static struct opengl_funcs * CDECL nulldrv_wine_get_wgl_driver( UINT version ) +@@ -924,6 +925,11 @@ static struct opengl_funcs * CDECL nulldrv_wine_get_wgl_driver( UINT version ) return (void *)-1; } @@ -104,7 +104,7 @@ index 67a051f59f1..73e77b7c2c1 100644 static void CDECL nulldrv_ThreadDetach( void ) { } -@@ -1135,6 +1141,7 @@ void CDECL __wine_set_display_driver( struct user_driver_funcs *driver, UINT ver +@@ -1263,6 +1269,7 @@ void CDECL __wine_set_display_driver( struct user_driver_funcs *driver, UINT ver SET_USER_FUNC(SystemParametersInfo); SET_USER_FUNC(wine_get_vulkan_driver); SET_USER_FUNC(wine_get_wgl_driver); @@ -261,5 +261,5 @@ index e6f8239e27d..560c21b18c1 100644 void (CDECL *pThreadDetach)(void); }; -- -2.34.1 +2.35.1 diff --git a/patches/winex11-_NET_ACTIVE_WINDOW/0001-winex11.drv-Add-support-for-_NET_ACTIVE_WINDOW.patch b/patches/winex11-_NET_ACTIVE_WINDOW/0001-winex11.drv-Add-support-for-_NET_ACTIVE_WINDOW.patch index e2855b71..412a1a56 100644 --- a/patches/winex11-_NET_ACTIVE_WINDOW/0001-winex11.drv-Add-support-for-_NET_ACTIVE_WINDOW.patch +++ b/patches/winex11-_NET_ACTIVE_WINDOW/0001-winex11.drv-Add-support-for-_NET_ACTIVE_WINDOW.patch @@ -1,4 +1,4 @@ -From 0ec817b88c5aadb3afe4dcaec32359a80296dbf5 Mon Sep 17 00:00:00 2001 +From 7eadbc5af779e201bf2896c9938479e448cce7ab Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Wed, 10 Feb 2016 15:09:29 +0800 Subject: [PATCH] winex11.drv: Add support for _NET_ACTIVE_WINDOW. (v2) @@ -8,7 +8,6 @@ And use it as a backend in user32.SetActiveWindow(). For bug #2155. --- dlls/user32/driver.c | 5 ++++ - dlls/user32/focus.c | 2 ++ dlls/win32u/driver.c | 5 ++++ dlls/winex11.drv/event.c | 5 ++++ dlls/winex11.drv/init.c | 1 + @@ -16,49 +15,36 @@ For bug #2155. dlls/winex11.drv/x11drv.h | 3 +++ dlls/winex11.drv/x11drv_main.c | 1 + include/wine/gdi_driver.h | 1 + - 9 files changed, 71 insertions(+) + 8 files changed, 69 insertions(+) diff --git a/dlls/user32/driver.c b/dlls/user32/driver.c -index ffcf8d264a1..86444d8a831 100644 +index f86e3ff1f7f..a3a084e2953 100644 --- a/dlls/user32/driver.c +++ b/dlls/user32/driver.c -@@ -208,6 +208,10 @@ static void CDECL nulldrv_ReleaseDC( HWND hwnd, HDC hdc ) +@@ -100,6 +100,10 @@ static void CDECL nulldrv_ReleaseDC( HWND hwnd, HDC hdc ) { } -+static void CDECL nulldrv_SetActiveWindow( HWND hwnd ) ++static void CDECL nulldrv_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags ) +{ +} + - static void CDECL nulldrv_SetCapture( HWND hwnd, UINT flags ) + static void CDECL nulldrv_SetParent( HWND hwnd, HWND parent, HWND old_parent ) { } -@@ -403,6 +407,7 @@ static struct user_driver_funcs lazy_load_driver = - nulldrv_MsgWaitForMultipleObjectsEx, - nulldrv_ReleaseDC, +@@ -211,6 +215,7 @@ static struct user_driver_funcs lazy_load_driver = NULL, -+ nulldrv_SetActiveWindow, - nulldrv_SetCapture, - nulldrv_SetFocus, - loaderdrv_SetLayeredWindowAttributes, -diff --git a/dlls/user32/focus.c b/dlls/user32/focus.c -index 775a8f428c1..bd6d12cd355 100644 ---- a/dlls/user32/focus.c -+++ b/dlls/user32/focus.c -@@ -178,6 +178,8 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus ) - PostMessageW( GetDesktopWindow(), WM_PARENTNOTIFY, WM_NCACTIVATE, (LPARAM)hwnd ); - } - -+ USER_Driver->pSetActiveWindow( hwnd ); -+ - /* now change focus if necessary */ - if (focus) - { + NULL, + NULL, ++ nulldrv_SetLayeredWindowAttributes, + nulldrv_SetParent, + NULL, + nulldrv_SetWindowIcon, diff --git a/dlls/win32u/driver.c b/dlls/win32u/driver.c -index f52a2240e59..bac29683ca4 100644 +index 0cc6e36f47d..41ff4a80f07 100644 --- a/dlls/win32u/driver.c +++ b/dlls/win32u/driver.c -@@ -858,6 +858,10 @@ static BOOL CDECL nulldrv_ScrollDC( HDC hdc, INT dx, INT dy, HRGN update ) +@@ -842,6 +842,10 @@ static BOOL CDECL nulldrv_ScrollDC( HDC hdc, INT dx, INT dy, HRGN update ) hdc, rect.left - dx, rect.top - dy, SRCCOPY, 0, 0 ); } @@ -69,7 +55,7 @@ index f52a2240e59..bac29683ca4 100644 static void CDECL nulldrv_SetCapture( HWND hwnd, UINT flags ) { } -@@ -1088,6 +1092,7 @@ void CDECL __wine_set_display_driver( struct user_driver_funcs *driver, UINT ver +@@ -1252,6 +1256,7 @@ void CDECL __wine_set_display_driver( struct user_driver_funcs *driver, UINT ver SET_USER_FUNC(MsgWaitForMultipleObjectsEx); SET_USER_FUNC(ReleaseDC); SET_USER_FUNC(ScrollDC); @@ -101,10 +87,10 @@ index 6a4f3b5db08..50cb77037c1 100644 Foreground window, because in most cases the messages sent above must have already changed the foreground window, in which diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c -index 7ed3ef7183c..75884022107 100644 +index 4fb100e684b..d02414904f2 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c -@@ -405,6 +405,7 @@ static const struct user_driver_funcs x11drv_funcs = +@@ -397,6 +397,7 @@ static const struct user_driver_funcs x11drv_funcs = .pMsgWaitForMultipleObjectsEx = X11DRV_MsgWaitForMultipleObjectsEx, .pReleaseDC = X11DRV_ReleaseDC, .pScrollDC = X11DRV_ScrollDC, @@ -113,10 +99,10 @@ index 7ed3ef7183c..75884022107 100644 .pSetFocus = X11DRV_SetFocus, .pSetLayeredWindowAttributes = X11DRV_SetLayeredWindowAttributes, diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c -index 8d60c9f1fca..5b53ab73138 100644 +index 8fb1a4a2786..91ee448ac67 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c -@@ -2239,6 +2239,54 @@ BOOL CDECL X11DRV_ScrollDC( HDC hdc, INT dx, INT dy, HRGN update ) +@@ -2237,6 +2237,54 @@ BOOL CDECL X11DRV_ScrollDC( HDC hdc, INT dx, INT dy, HRGN update ) } @@ -200,10 +186,10 @@ index 9b6d83ae4f3..8d9511cb579 100644 XATOM__NET_STARTUP_INFO, XATOM__NET_SUPPORTED, diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c -index bdd458182af..f775c2aa89b 100644 +index 4c63d5b3b06..58b31acaa28 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c -@@ -160,6 +160,7 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] = +@@ -156,6 +156,7 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] = "DndSelection", "_ICC_PROFILE", "_MOTIF_WM_HINTS", @@ -212,10 +198,10 @@ index bdd458182af..f775c2aa89b 100644 "_NET_STARTUP_INFO", "_NET_SUPPORTED", diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h -index ff92d097f7d..17ba60e0307 100644 +index 560c21b18c1..88319342506 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h -@@ -301,6 +301,7 @@ struct user_driver_funcs +@@ -300,6 +300,7 @@ struct user_driver_funcs DWORD (CDECL *pMsgWaitForMultipleObjectsEx)(DWORD,const HANDLE*,DWORD,DWORD,DWORD); void (CDECL *pReleaseDC)(HWND,HDC); BOOL (CDECL *pScrollDC)(HDC,INT,INT,HRGN); @@ -224,5 +210,5 @@ index ff92d097f7d..17ba60e0307 100644 void (CDECL *pSetFocus)(HWND); void (CDECL *pSetLayeredWindowAttributes)(HWND,COLORREF,BYTE,DWORD); -- -2.33.0 +2.35.1 diff --git a/patches/winex11-_NET_ACTIVE_WINDOW/0002-user32-Before-asking-a-WM-to-activate-a-window-make-.patch b/patches/winex11-_NET_ACTIVE_WINDOW/0002-user32-Before-asking-a-WM-to-activate-a-window-make-.patch index 026eabf7..bdf029bb 100644 --- a/patches/winex11-_NET_ACTIVE_WINDOW/0002-user32-Before-asking-a-WM-to-activate-a-window-make-.patch +++ b/patches/winex11-_NET_ACTIVE_WINDOW/0002-user32-Before-asking-a-WM-to-activate-a-window-make-.patch @@ -1,31 +1,29 @@ -From 3dd2f47626b20155cdf1974f39f4d641a56c93f3 Mon Sep 17 00:00:00 2001 +From 0c87051cd420a36eee8c30b1a647c2668caaf589 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Wed, 6 Apr 2016 15:14:25 +0800 -Subject: user32: Before asking a WM to activate a window make sure that the - window is in foreground and not minimized. +Subject: [PATCH] user32: Before asking a WM to activate a window make sure + that the window is in foreground and not minimized. This patch fixes iconify action using WM's taskbar buttons for Winamp. --- - dlls/user32/focus.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) + dlls/win32u/input.c | 4 ++++ + 1 file changed, 4 insertions(+) -diff --git a/dlls/user32/focus.c b/dlls/user32/focus.c -index 3746950..2ab599a 100644 ---- a/dlls/user32/focus.c -+++ b/dlls/user32/focus.c -@@ -156,9 +156,10 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus ) +diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c +index 3e838e5b17d..ee07627c008 100644 +--- a/dlls/win32u/input.c ++++ b/dlls/win32u/input.c +@@ -1277,6 +1277,10 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus ) (LPARAM)previous ); - if (GetAncestor( hwnd, GA_PARENT ) == GetDesktopWindow()) - PostMessageW( GetDesktopWindow(), WM_PARENTNOTIFY, WM_NCACTIVATE, (LPARAM)hwnd ); -- } - -- USER_Driver->pSetActiveWindow( hwnd ); -+ if (hwnd == NtUserGetForegroundWindow() && !IsIconic( hwnd )) -+ USER_Driver->pSetActiveWindow( hwnd ); -+ } + if (NtUserGetAncestor( hwnd, GA_PARENT ) == get_desktop_window()) + post_message( get_desktop_window(), WM_PARENTNOTIFY, WM_NCACTIVATE, (LPARAM)hwnd ); ++ ++ if (hwnd == NtUserGetForegroundWindow() && !is_iconic( hwnd )) ++ NtUserSetActiveWindow( hwnd ); ++ + } /* now change focus if necessary */ - if (focus) -- -2.8.0 +2.35.1 diff --git a/patches/wininet-Cleanup/0001-wininet-tests-Add-more-tests-for-cookies.patch b/patches/wininet-Cleanup/0001-wininet-tests-Add-more-tests-for-cookies.patch index e717137c..8acdb64d 100644 --- a/patches/wininet-Cleanup/0001-wininet-tests-Add-more-tests-for-cookies.patch +++ b/patches/wininet-Cleanup/0001-wininet-tests-Add-more-tests-for-cookies.patch @@ -1,4 +1,4 @@ -From 915a805cabaec3cc265f4f8ad9f0005502f8fd24 Mon Sep 17 00:00:00 2001 +From b157667185244a4e963fa3c161c76ea53410d16d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Fri, 15 May 2015 20:37:19 +0200 Subject: [PATCH] wininet/tests: Add more tests for cookies. @@ -8,10 +8,10 @@ Subject: [PATCH] wininet/tests: Add more tests for cookies. 1 file changed, 89 insertions(+), 3 deletions(-) diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c -index 90a38dc3a..55d51b299 100644 +index 98d1b74ca85..308d6a74c20 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c -@@ -2068,6 +2068,14 @@ static const char largemsg[] = +@@ -2105,6 +2105,14 @@ static const char largemsg[] = "Content-Length: %I64u\r\n" "\r\n"; @@ -26,7 +26,7 @@ index 90a38dc3a..55d51b299 100644 static const char notokmsg[] = "HTTP/1.1 400 Bad Request\r\n" "Server: winetest\r\n" -@@ -2438,6 +2446,32 @@ static DWORD CALLBACK server_thread(LPVOID param) +@@ -2524,6 +2532,32 @@ static DWORD CALLBACK server_thread(LPVOID param) else send(c, noauthmsg, sizeof noauthmsg-1, 0); } @@ -59,7 +59,7 @@ index 90a38dc3a..55d51b299 100644 if (strstr(buffer, "/test_host_override")) { if (strstr(buffer, host_header_override)) -@@ -3816,7 +3850,7 @@ static void test_cookie_header(int port) +@@ -4037,7 +4071,7 @@ static void test_cookie_header(int port) HINTERNET ses, con, req; DWORD size, error; BOOL ret; @@ -68,24 +68,24 @@ index 90a38dc3a..55d51b299 100644 ses = InternetOpenA("winetest", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0); ok(ses != NULL, "InternetOpen failed\n"); -@@ -3844,7 +3878,7 @@ static void test_cookie_header(int port) +@@ -4065,7 +4099,7 @@ static void test_cookie_header(int port) size = sizeof(buffer); ret = HttpQueryInfoA(req, HTTP_QUERY_COOKIE | HTTP_QUERY_FLAG_REQUEST_HEADERS, buffer, &size, NULL); - ok(ret, "HttpQueryInfo failed: %u\n", GetLastError()); + ok(ret, "HttpQueryInfo failed: %lu\n", GetLastError()); - ok(!strcmp(buffer, "cookie=not biscuit"), "got '%s' expected \'cookie=not biscuit\'\n", buffer); + ok(!!strstr(buffer, "cookie=not biscuit"), "got '%s' expected \'cookie=not biscuit\'\n", buffer); ret = HttpSendRequestA(req, NULL, 0, NULL, 0); - ok(ret, "HttpSendRequest failed: %u\n", GetLastError()); -@@ -3855,9 +3889,61 @@ static void test_cookie_header(int port) + ok(ret, "HttpSendRequest failed: %lu\n", GetLastError()); +@@ -4076,9 +4110,61 @@ static void test_cookie_header(int port) size = sizeof(buffer); ret = HttpQueryInfoA(req, HTTP_QUERY_COOKIE | HTTP_QUERY_FLAG_REQUEST_HEADERS, buffer, &size, NULL); - ok(ret, "HttpQueryInfo failed: %u\n", GetLastError()); + ok(ret, "HttpQueryInfo failed: %lu\n", GetLastError()); - ok(!strcmp(buffer, "cookie=biscuit"), "got '%s' expected \'cookie=biscuit\'\n", buffer); + ok(!strstr(buffer, "cookie=not biscuit"), "'%s' should not contain \'cookie=not biscuit\'\n", buffer); + ok(!!strstr(buffer, "cookie=biscuit"), "'%s' should contain \'cookie=biscuit\'\n", buffer); -+ -+ InternetCloseHandle(req); + + InternetCloseHandle(req); + + InternetSetCookieA("http://localhost/testCCCC", "subcookie", "data"); + @@ -118,12 +118,12 @@ index 90a38dc3a..55d51b299 100644 + + req = HttpOpenRequestA(con, NULL, "/test_cookie_path2", NULL, NULL, NULL, INTERNET_FLAG_KEEP_CONNECTION, 0); + ok(req != NULL, "HttpOpenRequest failed\n"); - ++ + ret = HttpSendRequestA(req, NULL, 0, NULL, 0); + ok(ret, "HttpSendRequest failed\n"); + + test_status_code(req, 400); - InternetCloseHandle(req); ++ InternetCloseHandle(req); + + req = HttpOpenRequestA(con, NULL, "/test_cookie_merge", NULL, NULL, NULL, INTERNET_FLAG_KEEP_CONNECTION, 0); + ok(req != NULL, "HttpOpenRequest failed\n"); @@ -141,5 +141,5 @@ index 90a38dc3a..55d51b299 100644 InternetCloseHandle(ses); } -- -2.23.0 +2.35.1 diff --git a/patches/wintrust-WTHelperGetProvCertFromChain/0001-wintrust-Add-parameter-check-in-WTHelperGetProvCertF.patch b/patches/wintrust-WTHelperGetProvCertFromChain/0001-wintrust-Add-parameter-check-in-WTHelperGetProvCertF.patch index bb3af8d2..a23b2fed 100644 --- a/patches/wintrust-WTHelperGetProvCertFromChain/0001-wintrust-Add-parameter-check-in-WTHelperGetProvCertF.patch +++ b/patches/wintrust-WTHelperGetProvCertFromChain/0001-wintrust-Add-parameter-check-in-WTHelperGetProvCertF.patch @@ -1,4 +1,4 @@ -From 7f8f6898788adbb31318aaead591b129138288c2 Mon Sep 17 00:00:00 2001 +From d5ac0d0d4a4e5d26f2892572502ab7e7fd5d812e Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Wed, 18 Apr 2018 03:55:16 +0000 Subject: [PATCH] wintrust: Add parameter check in WTHelperGetProvCertFromChain @@ -10,11 +10,11 @@ Signed-off-by: Alistair Leslie-Hughes 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dlls/wintrust/tests/softpub.c b/dlls/wintrust/tests/softpub.c -index 25d458faad7..998cce85380 100644 +index 8195e6006b1..1fa99fa71ce 100644 --- a/dlls/wintrust/tests/softpub.c +++ b/dlls/wintrust/tests/softpub.c @@ -1312,6 +1312,14 @@ static void test_get_known_usages(void) - "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); } +static void test_WTHelperGetProvCertFromChain(void) @@ -48,5 +48,5 @@ index 33695008b24..60c633e5abf 100644 cert = &pSgnr->pasCertChain[idxCert]; TRACE("returning %p\n", cert); -- -2.34.1 +2.35.1 diff --git a/staging/upstream-commit b/staging/upstream-commit index 6f6f6e55..7dc0fc5c 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -18230d23c599f1f5f9dd419dccc11c49117cc3b8 +330dc601978922aa1d5864d29d94882d6b1990d1