From 99c296e10c08046e2712a55d576b6c41281db0cb Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Fri, 24 Jul 2020 09:56:26 +1000 Subject: [PATCH] Rebase against 2a6de8d7f7d6f5ac018d8e330cfa580fc0c3b9e5. --- ...nel32-tests-psapi-tests-Update-tests.patch | 96 +++---------------- patches/patchinstall.sh | 2 +- ...w-to-select-default-display-frequenc.patch | 30 +++--- staging/upstream-commit | 2 +- 4 files changed, 28 insertions(+), 102 deletions(-) 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 96659470..866eefaa 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,15 +1,15 @@ -From a27883925e3317291e15798a1114d019d289d857 Mon Sep 17 00:00:00 2001 +From aea7dcfb0b09794b4925c5e8f0ca2a28b783e8f1 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/psapi/tests/psapi_main.c | 38 +++++++++++++++++++++++------------ - 2 files changed, 27 insertions(+), 30 deletions(-) + dlls/kernel32/tests/virtual.c | 19 ++----------------- + dlls/psapi/tests/psapi_main.c | 5 +++++ + 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c -index f576d132d8b5..70824d771ed2 100644 +index f576d132d8b..70824d771ed 100644 --- a/dlls/kernel32/tests/virtual.c +++ b/dlls/kernel32/tests/virtual.c @@ -3572,9 +3572,7 @@ static void test_CreateFileMapping_protection(void) @@ -98,27 +98,10 @@ index f576d132d8b5..70824d771ed2 100644 CloseHandle( hfile ); diff --git a/dlls/psapi/tests/psapi_main.c b/dlls/psapi/tests/psapi_main.c -index da7524dd60a0..eb52fc690cfd 100644 +index c92423ee193..d85099455aa 100644 --- a/dlls/psapi/tests/psapi_main.c +++ b/dlls/psapi/tests/psapi_main.c -@@ -791,7 +791,7 @@ free_page: - } - - static void check_QueryWorkingSetEx(PVOID addr, const char *desc, DWORD expected_valid, -- DWORD expected_protection, DWORD expected_shared, BOOL todo, BOOL todo_shared) -+ DWORD expected_protection, DWORD expected_shared, BOOL todo) - { - PSAPI_WORKING_SET_EX_INFORMATION info; - BOOL ret; -@@ -814,7 +814,6 @@ static void check_QueryWorkingSetEx(PVOID addr, const char *desc, DWORD expected - ok(info.VirtualAttributes.LargePage == 0, "%s expected LargePage=0 but got %u\n", - desc, info.VirtualAttributes.LargePage); - -- todo_wine_if(todo_shared) - ok(info.VirtualAttributes.Shared == expected_shared || broken(!info.VirtualAttributes.Valid) /* w2003 */, - "%s expected Shared=%u but got %u\n", desc, expected_shared, info.VirtualAttributes.Shared); - if (info.VirtualAttributes.Valid && info.VirtualAttributes.Shared) -@@ -831,6 +830,8 @@ static void test_QueryWorkingSetEx(void) +@@ -830,6 +830,8 @@ static void test_QueryWorkingSetEx(void) DWORD prot; BOOL ret; @@ -127,73 +110,16 @@ index da7524dd60a0..eb52fc690cfd 100644 if (pQueryWorkingSetEx == NULL) { win_skip("QueryWorkingSetEx not found, skipping tests\n"); -@@ -838,44 +839,55 @@ static void test_QueryWorkingSetEx(void) - } - - addr = GetModuleHandleA(NULL); -- check_QueryWorkingSetEx(addr, "exe", 1, PAGE_READONLY, 1, FALSE, TRUE); -+ check_QueryWorkingSetEx(addr, "exe", 1, PAGE_READONLY, 1, FALSE); - - ret = VirtualProtect(addr, 0x1000, PAGE_NOACCESS, &prot); - ok(ret, "VirtualProtect failed with %d\n", GetLastError()); -- check_QueryWorkingSetEx(addr, "exe,noaccess", 0, 0, 1, FALSE, TRUE); -+ check_QueryWorkingSetEx(addr, "exe,noaccess", 0, 0, 1, FALSE); - - ret = VirtualProtect(addr, 0x1000, prot, &prot); - ok(ret, "VirtualProtect failed with %d\n", GetLastError()); -- check_QueryWorkingSetEx(addr, "exe,readonly1", 0, 0, 1, TRUE, TRUE); -+ check_QueryWorkingSetEx(addr, "exe,readonly1", 0, 0, 1, TRUE); +@@ -848,6 +850,9 @@ static void test_QueryWorkingSetEx(void) + check_QueryWorkingSetEx(addr, "exe,readonly1", 0, 0, 1, TRUE); *(volatile char *)addr; + check_QueryWorkingSetEx(addr, "exe,readonly2", 1, PAGE_READONLY, 1, FALSE); + + ret = VirtualProtect(addr, 0x1000, PAGE_EXECUTE_READWRITE, &prot); ok(ret, "VirtualProtect failed with %d\n", GetLastError()); -- check_QueryWorkingSetEx(addr, "exe,readonly2", 1, PAGE_READONLY, 1, FALSE, TRUE); -+ check_QueryWorkingSetEx(addr, "exe,readwrite1", 1, PAGE_EXECUTE_WRITECOPY, 1, FALSE); -+ -+ *(volatile char *)addr = 1; -+ check_QueryWorkingSetEx(addr, "exe,readwrite2", 1, PAGE_EXECUTE_READWRITE, 0, FALSE); -+ -+ *(volatile char *)&tmp_data[0x1000]; -+ check_QueryWorkingSetEx(tmp_data + 0x1000, "exe,data1", 1, PAGE_WRITECOPY, 1, FALSE); -+ tmp_data[0x1000] = 1; -+ check_QueryWorkingSetEx(tmp_data + 0x1000, "exe,data2", 1, PAGE_READWRITE, 0, FALSE); + check_QueryWorkingSetEx(addr, "exe,readonly2", 1, PAGE_READONLY, 1, FALSE); - addr = VirtualAlloc(NULL, 0x1000, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); - ok(addr != NULL, "VirtualAlloc failed with %d\n", GetLastError()); -- check_QueryWorkingSetEx(addr, "valloc", 0, 0, 0, FALSE, FALSE); -+ check_QueryWorkingSetEx(addr, "valloc", 0, 0, 0, FALSE); - - *(volatile char *)addr; -- check_QueryWorkingSetEx(addr, "valloc,read", 1, PAGE_READWRITE, 0, FALSE, FALSE); -+ check_QueryWorkingSetEx(addr, "valloc,read", 1, PAGE_READWRITE, 0, FALSE); - - *(volatile char *)addr = 0x42; -- check_QueryWorkingSetEx(addr, "valloc,write", 1, PAGE_READWRITE, 0, FALSE, FALSE); -+ check_QueryWorkingSetEx(addr, "valloc,write", 1, PAGE_READWRITE, 0, FALSE); - - ret = VirtualProtect(addr, 0x1000, PAGE_NOACCESS, &prot); - ok(ret, "VirtualProtect failed with %d\n", GetLastError()); -- check_QueryWorkingSetEx(addr, "valloc,noaccess", 0, 0, 0, FALSE, FALSE); -+ check_QueryWorkingSetEx(addr, "valloc,noaccess", 0, 0, 0, FALSE); - - ret = VirtualProtect(addr, 0x1000, prot, &prot); - ok(ret, "VirtualProtect failed with %d\n", GetLastError()); -- check_QueryWorkingSetEx(addr, "valloc,readwrite1", 0, 0, 0, TRUE, FALSE); -+ check_QueryWorkingSetEx(addr, "valloc,readwrite1", 0, 0, 0, TRUE); - - *(volatile char *)addr; -- check_QueryWorkingSetEx(addr, "valloc,readwrite2", 1, PAGE_READWRITE, 0, FALSE, FALSE); -+ check_QueryWorkingSetEx(addr, "valloc,readwrite2", 1, PAGE_READWRITE, 0, FALSE); - - ret = VirtualFree(addr, 0, MEM_RELEASE); - ok(ret, "VirtualFree failed with %d\n", GetLastError()); -- check_QueryWorkingSetEx(addr, "valloc,free", FALSE, 0, 0, FALSE, FALSE); -+ check_QueryWorkingSetEx(addr, "valloc,free", FALSE, 0, 0, FALSE); - } - - START_TEST(psapi_main) -- -2.20.1 +2.27.0 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 2061a625..15b97030 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "07030059486e0121051b452c94d37f12931cabf4" + echo "2a6de8d7f7d6f5ac018d8e330cfa580fc0c3b9e5" } # Show version information diff --git a/patches/winex11-DefaultDisplayFrequency/0001-winex11.drv-Allow-to-select-default-display-frequenc.patch b/patches/winex11-DefaultDisplayFrequency/0001-winex11.drv-Allow-to-select-default-display-frequenc.patch index c72b5f04..c7927241 100644 --- a/patches/winex11-DefaultDisplayFrequency/0001-winex11.drv-Allow-to-select-default-display-frequenc.patch +++ b/patches/winex11-DefaultDisplayFrequency/0001-winex11.drv-Allow-to-select-default-display-frequenc.patch @@ -1,4 +1,4 @@ -From 6de6fba2c1135044da2a9958df07772f00784de5 Mon Sep 17 00:00:00 2001 +From 143a62bdfaed5466d42835682b7d9de35cee8423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Thu, 5 Nov 2015 14:33:48 +0100 Subject: [PATCH] winex11.drv: Allow to select default display frequency in @@ -17,19 +17,19 @@ HKCU\Software\Wine\X11 Driver\DefaultDisplayFrequency 3 files changed, 44 insertions(+), 15 deletions(-) diff --git a/dlls/winex11.drv/settings.c b/dlls/winex11.drv/settings.c -index bbbb6fdf0a3..82120cdbc2a 100644 +index 28c405ae0e0..dcda676788f 100644 --- a/dlls/winex11.drv/settings.c +++ b/dlls/winex11.drv/settings.c -@@ -378,7 +378,7 @@ LONG CDECL X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, - WCHAR primary_adapter[CCHDEVICENAME]; - char bpp_buffer[16], freq_buffer[18]; - DEVMODEW default_mode; +@@ -526,7 +526,7 @@ LONG CDECL X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, + DEVMODEW default_mode, *full_mode; + ULONG_PTR id; + LONG ret; - DWORD i; + DWORD i, mode; - if (!get_primary_adapter(primary_adapter)) - return DISP_CHANGE_FAILED; -@@ -402,6 +402,7 @@ LONG CDECL X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, + /* Use the new interface if it is available */ + if (!handler.name) +@@ -621,6 +621,7 @@ old_interface: return DISP_CHANGE_SUCCESSFUL; } @@ -37,7 +37,7 @@ index bbbb6fdf0a3..82120cdbc2a 100644 for (i = 0; i < dd_mode_count; i++) { if (devmode->dmFields & DM_BITSPERPEL) -@@ -419,12 +420,24 @@ LONG CDECL X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, +@@ -638,12 +639,24 @@ old_interface: if (devmode->dmPelsHeight != dd_modes[i].height) continue; } @@ -64,7 +64,7 @@ index bbbb6fdf0a3..82120cdbc2a 100644 /* we have a valid mode */ TRACE("Requested display settings match mode %d (%s)\n", i, handler_name); -@@ -441,20 +454,31 @@ LONG CDECL X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, +@@ -660,20 +673,31 @@ old_interface: return DISP_CHANGE_SUCCESSFUL; } @@ -109,10 +109,10 @@ index bbbb6fdf0a3..82120cdbc2a 100644 + return DISP_CHANGE_SUCCESSFUL; } diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h -index a9eaed20cab..76e1344a616 100644 +index c47394f97b2..c4967bbb12f 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h -@@ -404,6 +404,7 @@ extern BOOL private_color_map DECLSPEC_HIDDEN; +@@ -403,6 +403,7 @@ extern BOOL private_color_map DECLSPEC_HIDDEN; extern int primary_monitor DECLSPEC_HIDDEN; extern int copy_default_colors DECLSPEC_HIDDEN; extern int alloc_system_colors DECLSPEC_HIDDEN; @@ -121,7 +121,7 @@ index a9eaed20cab..76e1344a616 100644 extern HMODULE x11drv_module DECLSPEC_HIDDEN; extern char *process_name DECLSPEC_HIDDEN; diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c -index e6e61e801e1..6b82784c5f9 100644 +index 4b163aaafbb..da6f7edbabe 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -85,6 +85,7 @@ BOOL client_side_with_render = TRUE; @@ -132,7 +132,7 @@ index e6e61e801e1..6b82784c5f9 100644 DWORD thread_data_tls_index = TLS_OUT_OF_INDEXES; int xrender_error_base = 0; HMODULE x11drv_module = 0; -@@ -435,6 +436,9 @@ static void setup_options(void) +@@ -438,6 +439,9 @@ static void setup_options(void) if (!get_config_key( hkey, appkey, "AllocSystemColors", buffer, sizeof(buffer) )) alloc_system_colors = atoi(buffer); diff --git a/staging/upstream-commit b/staging/upstream-commit index d2439e8c..217e811e 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -07030059486e0121051b452c94d37f12931cabf4 +2a6de8d7f7d6f5ac018d8e330cfa580fc0c3b9e5