diff --git a/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch b/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch index 84bee879..d737ff6a 100644 --- a/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch +++ b/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch @@ -1,4 +1,4 @@ -From 0c8487ff0c2b10bae391672c5876bfcc5987f7de Mon Sep 17 00:00:00 2001 +From 1ebb577d45e3b2525f67bd03c816d3567cede547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Mon, 3 Apr 2017 05:30:27 +0200 Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data. @@ -10,7 +10,7 @@ Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data. 3 files changed, 145 insertions(+), 2 deletions(-) diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c -index b497ce3..c54eade 100644 +index 15d9b44..e4fb367 100644 --- a/dlls/kernel32/tests/loader.c +++ b/dlls/kernel32/tests/loader.c @@ -30,6 +30,7 @@ @@ -21,8 +21,8 @@ index b497ce3..c54eade 100644 #include "wine/test.h" #include "delayloadhandler.h" -@@ -3842,6 +3843,79 @@ static void test_InMemoryOrderModuleList(void) - ok(entry2 == mark2, "expected entry2 == mark2, got %p and %p\n", entry2, mark2); +@@ -3894,6 +3895,79 @@ static void test_dll_file( const char *name ) + #undef OK_FIELD } +static inline WCHAR toupperW(WCHAR c) @@ -101,11 +101,15 @@ index b497ce3..c54eade 100644 START_TEST(loader) { int argc; -@@ -3908,6 +3982,8 @@ START_TEST(loader) +@@ -3961,10 +4035,12 @@ START_TEST(loader) test_import_resolution(); test_ExitProcess(); test_InMemoryOrderModuleList(); + test_HashLinks(); + test_dll_file( "ntdll.dll" ); + test_dll_file( "kernel32.dll" ); + test_dll_file( "advapi32.dll" ); + test_dll_file( "user32.dll" ); + /* loader test must be last, it can corrupt the internal loader state on Windows */ test_Loader(); diff --git a/patches/ntdll-NtQueryVirtualMemory/0002-ntdll-Split-logic-for-MemoryBasicInformation-into-a-.patch b/patches/ntdll-NtQueryVirtualMemory/0002-ntdll-Split-logic-for-MemoryBasicInformation-into-a-.patch index 00f078bc..afc1d2c1 100644 --- a/patches/ntdll-NtQueryVirtualMemory/0002-ntdll-Split-logic-for-MemoryBasicInformation-into-a-.patch +++ b/patches/ntdll-NtQueryVirtualMemory/0002-ntdll-Split-logic-for-MemoryBasicInformation-into-a-.patch @@ -1,7 +1,7 @@ -From b96f68dff9f1daf7a2aa1427b16299bafb1a068a Mon Sep 17 00:00:00 2001 +From c3a85e487e8e1ee017a2d03e9f7eccbfdd99306a Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Sun, 28 May 2017 04:19:06 +0200 -Subject: ntdll: Split logic for MemoryBasicInformation into a separate +Subject: [PATCH] ntdll: Split logic for MemoryBasicInformation into a separate function. --- @@ -9,10 +9,10 @@ Subject: ntdll: Split logic for MemoryBasicInformation into a separate 1 file changed, 37 insertions(+), 28 deletions(-) diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c -index 2ac0c4394f7..5e92cbb50ea 100644 +index c86ca88..26fe4a8 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c -@@ -2439,40 +2439,16 @@ static int get_free_mem_state_callback( void *start, size_t size, void *arg ) +@@ -2786,40 +2786,16 @@ static int get_free_mem_state_callback( void *start, size_t size, void *arg ) return 1; } @@ -54,10 +54,10 @@ index 2ac0c4394f7..5e92cbb50ea 100644 - } - } - - if (process != NtCurrentProcess()) - { - NTSTATUS status; -@@ -2584,6 +2560,39 @@ NTSTATUS WINAPI NtQueryVirtualMemory( HANDLE process, LPCVOID addr, + if (len < sizeof(MEMORY_BASIC_INFORMATION)) + return STATUS_INFO_LENGTH_MISMATCH; + +@@ -2934,6 +2910,39 @@ NTSTATUS WINAPI NtQueryVirtualMemory( HANDLE process, LPCVOID addr, } @@ -98,5 +98,5 @@ index 2ac0c4394f7..5e92cbb50ea 100644 * NtLockVirtualMemory (NTDLL.@) * ZwLockVirtualMemory (NTDLL.@) -- -2.14.1 +1.9.1 diff --git a/patches/ntdll-NtQueryVirtualMemory/0004-ntdll-tests-Add-tests-for-NtQueryVirtualMemory-Memor.patch b/patches/ntdll-NtQueryVirtualMemory/0004-ntdll-tests-Add-tests-for-NtQueryVirtualMemory-Memor.patch index 6e95b703..23ac15aa 100644 --- a/patches/ntdll-NtQueryVirtualMemory/0004-ntdll-tests-Add-tests-for-NtQueryVirtualMemory-Memor.patch +++ b/patches/ntdll-NtQueryVirtualMemory/0004-ntdll-tests-Add-tests-for-NtQueryVirtualMemory-Memor.patch @@ -1,4 +1,4 @@ -From 3a7aece1f3a8784ec20ea11e045bd4610a428651 Mon Sep 17 00:00:00 2001 +From 97f429aab4d3763b2b41f4badbacb5421caf0f75 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Sun, 28 May 2017 10:30:43 +0200 Subject: [PATCH] ntdll/tests: Add tests for @@ -9,10 +9,10 @@ Subject: [PATCH] ntdll/tests: Add tests for 1 file changed, 35 insertions(+) diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c -index 1f1c675e9f..61a006f15e 100644 +index 5f27d8b..7b470cd 100644 --- a/dlls/ntdll/tests/info.c +++ b/dlls/ntdll/tests/info.c -@@ -1795,6 +1795,8 @@ static void test_queryvirtualmemory(void) +@@ -1928,6 +1928,8 @@ static void test_queryvirtualmemory(void) MEMORY_BASIC_INFORMATION mbi; char stackbuf[42]; HMODULE module; @@ -21,10 +21,10 @@ index 1f1c675e9f..61a006f15e 100644 module = GetModuleHandleA( "ntdll.dll" ); trace("Check flags of the PE header of NTDLL.DLL at %p\n", module); -@@ -1872,6 +1874,39 @@ static void test_queryvirtualmemory(void) - /* check error code when addr is higher than working set limit */ - status = pNtQueryVirtualMemory(NtCurrentProcess(), (void *)~0, MemoryBasicInformation, &mbi, sizeof(mbi), &readcount); - ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got %08x\n", status); +@@ -2008,6 +2010,39 @@ static void test_queryvirtualmemory(void) + /* check error code when len is less than MEMORY_BASIC_INFORMATION size */ + status = pNtQueryVirtualMemory(NtCurrentProcess(), GetProcessHeap(), MemoryBasicInformation, &mbi, sizeof(MEMORY_BASIC_INFORMATION) - 1, &readcount); + ok(status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); + + trace("Check section name of NTDLL.DLL with invalid size\n"); + module = GetModuleHandleA( "ntdll.dll" ); @@ -62,5 +62,5 @@ index 1f1c675e9f..61a006f15e 100644 static void test_affinity(void) -- -2.16.1 +1.9.1 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 4e89d212..382c6a86 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "06531b1d9898ba3ac3b7c69d6192682202606f8f" + echo "5e86cc0a8f37295072b03b1c13aa205ff3e6f3e4" } # Show version information @@ -254,7 +254,6 @@ patch_enable_all () enable_qwave_QOSCreateHandle="$1" enable_riched20_Class_Tests="$1" enable_riched20_IText_Interface="$1" - enable_server_ClipCursor="$1" enable_server_Desktop_Refcount="$1" enable_server_FileEndOfFileInformation="$1" enable_server_File_Permissions="$1" @@ -321,7 +320,6 @@ patch_enable_all () enable_version_VerQueryValue="$1" enable_virtdisk_OpenVirtualDisk="$1" enable_widl_SLTG_Typelib_Support="$1" - enable_windowscodecs_32bppPRGBA="$1" enable_windowscodecs_GIF_Encoder="$1" enable_windowscodecs_IMILBitmapSource="$1" enable_windowscodecs_JPEG_Decoder="$1" @@ -917,9 +915,6 @@ patch_enable () riched20-IText_Interface) enable_riched20_IText_Interface="$2" ;; - server-ClipCursor) - enable_server_ClipCursor="$2" - ;; server-Desktop_Refcount) enable_server_Desktop_Refcount="$2" ;; @@ -1118,9 +1113,6 @@ patch_enable () widl-SLTG_Typelib_Support) enable_widl_SLTG_Typelib_Support="$2" ;; - windowscodecs-32bppPRGBA) - enable_windowscodecs_32bppPRGBA="$2" - ;; windowscodecs-GIF_Encoder) enable_windowscodecs_GIF_Encoder="$2" ;; @@ -1803,13 +1795,6 @@ if test "$enable_wineboot_ProxySettings" -eq 1; then enable_wineboot_drivers_etc_Stubs=1 fi -if test "$enable_windowscodecs_32bppPRGBA" -eq 1; then - if test "$enable_windowscodecs_TIFF_Support" -gt 1; then - abort "Patchset windowscodecs-TIFF_Support disabled, but windowscodecs-32bppPRGBA depends on that." - fi - enable_windowscodecs_TIFF_Support=1 -fi - if test "$enable_windowscodecs_TIFF_Support" -eq 1; then if test "$enable_windowscodecs_GIF_Encoder" -gt 1; then abort "Patchset windowscodecs-GIF_Encoder disabled, but windowscodecs-TIFF_Support depends on that." @@ -1871,9 +1856,6 @@ if test "$enable_server_Shared_Memory" -eq 1; then if test "$enable_ntdll_Threading" -gt 1; then abort "Patchset ntdll-Threading disabled, but server-Shared_Memory depends on that." fi - if test "$enable_server_ClipCursor" -gt 1; then - abort "Patchset server-ClipCursor disabled, but server-Shared_Memory depends on that." - fi if test "$enable_server_Key_State" -gt 1; then abort "Patchset server-Key_State disabled, but server-Shared_Memory depends on that." fi @@ -1884,7 +1866,6 @@ if test "$enable_server_Shared_Memory" -eq 1; then abort "Patchset server-Signal_Thread disabled, but server-Shared_Memory depends on that." fi enable_ntdll_Threading=1 - enable_server_ClipCursor=1 enable_server_Key_State=1 enable_server_PeekMessage=1 enable_server_Signal_Thread=1 @@ -3590,7 +3571,7 @@ fi # | * [#46549] httpapi: Fake success from HttpCreateServerSession # | # | Modified files: -# | * dlls/httpapi/httpapi_main.c +# | * dlls/httpapi/httpapi_main.c, dlls/httpapi/tests/httpapi.c # | if test "$enable_httpapi_HttpCreateServerSession" -eq 1; then patch_apply httpapi-HttpCreateServerSession/0001-httpapi-Fake-success-from-HttpCreateServerSession.patch @@ -5350,21 +5331,6 @@ if test "$enable_riched20_IText_Interface" -eq 1; then ) >> "$patchlist" fi -# Patchset server-ClipCursor -# | -# | This patchset fixes the following Wine bugs: -# | * [#38791] Fix handling of cursor position clipping -# | -# | Modified files: -# | * dlls/user32/tests/input.c, server/queue.c -# | -if test "$enable_server_ClipCursor" -eq 1; then - patch_apply server-ClipCursor/0001-server-Fix-handling-of-cursor-position-clipping.patch - ( - printf '%s\n' '+ { "Sebastian Lackner", "server: Improve handling of cursor position clipping for empty rectangle.", 2 },'; - ) >> "$patchlist" -fi - # Patchset server-Desktop_Refcount # | # | Modified files: @@ -5497,7 +5463,7 @@ fi # Patchset server-Shared_Memory # | # | This patchset has the following (direct or indirect) dependencies: -# | * ntdll-Threading, server-ClipCursor, server-Key_State, server-PeekMessage, server-Signal_Thread +# | * ntdll-Threading, server-Key_State, server-PeekMessage, server-Signal_Thread # | # | Modified files: # | * dlls/ntdll/ntdll_misc.h, dlls/ntdll/server.c, dlls/ntdll/thread.c, dlls/ntdll/virtual.c, dlls/user32/focus.c, @@ -5529,8 +5495,7 @@ fi # Patchset server-Object_Types # | # | This patchset has the following (direct or indirect) dependencies: -# | * server-Misc_ACL, ntdll-Threading, server-ClipCursor, server-Key_State, server-PeekMessage, server-Signal_Thread, server- -# | Shared_Memory +# | * server-Misc_ACL, ntdll-Threading, server-Key_State, server-PeekMessage, server-Signal_Thread, server-Shared_Memory # | # | This patchset fixes the following Wine bugs: # | * [#44629] Process Hacker can't enumerate handles @@ -6412,15 +6377,10 @@ fi # | dlls/winemac.drv/window.c, dlls/winex11.drv/window.c # | if test "$enable_user32_minimized_windows" -eq 1; then - patch_apply user32-minimized_windows/0001-user32-tests-Add-tests-for-GetWindowPlacement-and-Se.patch patch_apply user32-minimized_windows/0002-user32-SetWindowPos-shouldn-t-change-the-client-rect.patch patch_apply user32-minimized_windows/0003-user32-Correctly-calculate-the-client-size-of-a-mini.patch patch_apply user32-minimized_windows/0004-user32-Use-the-C-XY-MINIMIZED-rather-than-C-XY-ICON-.patch patch_apply user32-minimized_windows/0005-user32-AdjustWindowRect-shouldn-t-ignore-WS_MINIMIZE.patch - patch_apply user32-minimized_windows/0006-user32-tests-Add-tests-for-maximizing-and-minimizing.patch - patch_apply user32-minimized_windows/0007-user32-tests-Add-tests-for-maximizing-and-minimizing.patch - patch_apply user32-minimized_windows/0008-user32-tests-Add-tests-for-maximizing-and-minimizing.patch - patch_apply user32-minimized_windows/0009-user32-tests-Add-tests-for-ArrangeIconicWindows.patch patch_apply user32-minimized_windows/0010-user32-Reimplement-ArrangeIconicWindows-using-minimi.patch patch_apply user32-minimized_windows/0011-user32-Correctly-place-minimized-windows.patch patch_apply user32-minimized_windows/0012-user32-Paint-title-bars-for-minimized-windows.patch @@ -6428,15 +6388,10 @@ if test "$enable_user32_minimized_windows" -eq 1; then patch_apply user32-minimized_windows/0014-user32-Get-rid-of-icon-titles.patch patch_apply user32-minimized_windows/0015-user32-Move-iconic-windows-as-their-border-instead-o.patch ( - printf '%s\n' '+ { "Zebediah Figura", "user32/tests: Add tests for GetWindowPlacement() and SetWindowPlacement().", 1 },'; printf '%s\n' '+ { "Zebediah Figura", "user32: SetWindowPos() shouldn'\''t change the client rect of a minimized window.", 1 },'; printf '%s\n' '+ { "Zebediah Figura", "user32: Correctly calculate the client size of a minimized window.", 1 },'; printf '%s\n' '+ { "Zebediah Figura", "user32: Use the C[XY]MINIMIZED rather than C[XY]ICON size for minimized windows.", 1 },'; printf '%s\n' '+ { "Zebediah Figura", "user32: AdjustWindowRect() shouldn'\''t ignore WS_MINIMIZE.", 1 },'; - printf '%s\n' '+ { "Zebediah Figura", "user32/tests: Add tests for maximizing and minimizing owned windows.", 1 },'; - printf '%s\n' '+ { "Zebediah Figura", "user32/tests: Add tests for maximizing and minimizing child windows.", 1 },'; - printf '%s\n' '+ { "Zebediah Figura", "user32/tests: Add tests for maximizing and minimizing MDI child windows.", 1 },'; - printf '%s\n' '+ { "Zebediah Figura", "user32/tests: Add tests for ArrangeIconicWindows().", 1 },'; printf '%s\n' '+ { "Zebediah Figura", "user32: Reimplement ArrangeIconicWindows() using minimized metrics.", 1 },'; printf '%s\n' '+ { "Zebediah Figura", "user32: Correctly place minimized windows.", 1 },'; printf '%s\n' '+ { "Zebediah Figura", "user32: Paint title bars for minimized windows.", 1 },'; @@ -6567,6 +6522,37 @@ if test "$enable_windowscodecs_GIF_Encoder" -eq 1; then ) >> "$patchlist" fi +# Patchset windowscodecs-IMILBitmapSource +# | +# | This patchset fixes the following Wine bugs: +# | * [#34764] Improve compatibility of IMILBitmapSource interface +# | +# | Modified files: +# | * dlls/windowscodecs/bitmap.c, dlls/windowscodecs/scaler.c, dlls/windowscodecs/wincodecs_private.h +# | +if test "$enable_windowscodecs_IMILBitmapSource" -eq 1; then + patch_apply windowscodecs-IMILBitmapSource/0001-windowscodecs-Improve-compatibility-of-IMILBitmapSou.patch + patch_apply windowscodecs-IMILBitmapSource/0002-windowscodecs-Add-support-for-IMILBitmapScaler-inter.patch + ( + printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Improve compatibility of IMILBitmapSource interface.", 3 },'; + printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Add support for IMILBitmapScaler interface.", 2 },'; + ) >> "$patchlist" +fi + +# Patchset windowscodecs-JPEG_Decoder +# | +# | Modified files: +# | * dlls/windowscodecs/converter.c, dlls/windowscodecs/jpegformat.c +# | +if test "$enable_windowscodecs_JPEG_Decoder" -eq 1; then + patch_apply windowscodecs-JPEG_Decoder/0004-windowscodecs-Move-JPEG-frame-image-data-initializat.patch + patch_apply windowscodecs-JPEG_Decoder/0005-windowscodecs-Add-support-for-CMYK-to-BGR-conversion.patch + ( + printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Move JPEG frame image data initialization from Frame::CopyPixels to Decoder::Initialize.", 2 },'; + printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Add support for CMYK to BGR conversion.", 1 },'; + ) >> "$patchlist" +fi + # Patchset windowscodecs-TIFF_Support # | # | This patchset has the following (direct or indirect) dependencies: @@ -6613,55 +6599,6 @@ if test "$enable_windowscodecs_TIFF_Support" -eq 1; then ) >> "$patchlist" fi -# Patchset windowscodecs-32bppPRGBA -# | -# | This patchset has the following (direct or indirect) dependencies: -# | * windowscodecs-GIF_Encoder, windowscodecs-TIFF_Support -# | -# | Modified files: -# | * dlls/windowscodecs/converter.c, dlls/windowscodecs/info.c, dlls/windowscodecs/regsvr.c, -# | dlls/windowscodecs/tests/converter.c -# | -if test "$enable_windowscodecs_32bppPRGBA" -eq 1; then - patch_apply windowscodecs-32bppPRGBA/0001-windowscodecs-Add-support-for-32bppRGB-32bppRGBA-and.patch - patch_apply windowscodecs-32bppPRGBA/0002-windowscodecs-Fix-32bppRGB-to-32bppRGBA-conversion.patch - ( - printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Add support for 32bppRGB, 32bppRGBA and 32bppPRGBA to format converter.", 1 },'; - printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Fix 32bppRGB to 32bppRGBA conversion.", 1 },'; - ) >> "$patchlist" -fi - -# Patchset windowscodecs-IMILBitmapSource -# | -# | This patchset fixes the following Wine bugs: -# | * [#34764] Improve compatibility of IMILBitmapSource interface -# | -# | Modified files: -# | * dlls/windowscodecs/bitmap.c, dlls/windowscodecs/scaler.c, dlls/windowscodecs/wincodecs_private.h -# | -if test "$enable_windowscodecs_IMILBitmapSource" -eq 1; then - patch_apply windowscodecs-IMILBitmapSource/0001-windowscodecs-Improve-compatibility-of-IMILBitmapSou.patch - patch_apply windowscodecs-IMILBitmapSource/0002-windowscodecs-Add-support-for-IMILBitmapScaler-inter.patch - ( - printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Improve compatibility of IMILBitmapSource interface.", 3 },'; - printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Add support for IMILBitmapScaler interface.", 2 },'; - ) >> "$patchlist" -fi - -# Patchset windowscodecs-JPEG_Decoder -# | -# | Modified files: -# | * dlls/windowscodecs/converter.c, dlls/windowscodecs/jpegformat.c -# | -if test "$enable_windowscodecs_JPEG_Decoder" -eq 1; then - patch_apply windowscodecs-JPEG_Decoder/0004-windowscodecs-Move-JPEG-frame-image-data-initializat.patch - patch_apply windowscodecs-JPEG_Decoder/0005-windowscodecs-Add-support-for-CMYK-to-BGR-conversion.patch - ( - printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Move JPEG frame image data initialization from Frame::CopyPixels to Decoder::Initialize.", 2 },'; - printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Add support for CMYK to BGR conversion.", 1 },'; - ) >> "$patchlist" -fi - # Patchset wine.inf-Directory_ContextMenuHandlers # | # | This patchset fixes the following Wine bugs: diff --git a/patches/server-ClipCursor/0001-server-Fix-handling-of-cursor-position-clipping.patch b/patches/server-ClipCursor/0001-server-Fix-handling-of-cursor-position-clipping.patch deleted file mode 100644 index 6e00e6ce..00000000 --- a/patches/server-ClipCursor/0001-server-Fix-handling-of-cursor-position-clipping.patch +++ /dev/null @@ -1,132 +0,0 @@ -From 15bbbf3491c067e224fc96c44ea144f86b5ef70e Mon Sep 17 00:00:00 2001 -From: Sebastian Lackner -Date: Mon, 12 Jun 2017 18:47:54 +0200 -Subject: server: Improve handling of cursor position clipping for empty - rectangle. (v2) - -Based on a patch by Kevin Buhr. - -We cannot match the Windows behavior because there is no sane way to emulate -the unusual Windows cursor clipping in winex11/winemac. For now it is better -to keep wineserver and backends synchronized to avoid cursor drift. ---- - dlls/user32/tests/input.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++ - server/queue.c | 8 +++--- - 2 files changed, 73 insertions(+), 4 deletions(-) - -diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c -index a8a8c6c2fe5..5f70c4c1a64 100644 ---- a/dlls/user32/tests/input.c -+++ b/dlls/user32/tests/input.c -@@ -1278,6 +1278,19 @@ static LRESULT CALLBACK hook_proc2( int code, WPARAM wparam, LPARAM lparam ) - return CallNextHookEx( 0, code, wparam, lparam ); - } - -+static LRESULT CALLBACK hook_proc3( int code, WPARAM wparam, LPARAM lparam ) -+{ -+ POINT pt; -+ -+ if (code == HC_ACTION) -+ { -+ /* MSLLHOOKSTRUCT does not seem to be reliable and contains different data on each run. */ -+ GetCursorPos(&pt); -+ ok(pt.x == pt_old.x && pt.y == pt_old.y, "GetCursorPos: (%d,%d)\n", pt.x, pt.y); -+ } -+ return CallNextHookEx( 0, code, wparam, lparam ); -+} -+ - static void test_mouse_ll_hook(void) - { - HWND hwnd; -@@ -1351,6 +1364,62 @@ static void test_mouse_ll_hook(void) - ok(pt.x == pt_new.x && pt.y == pt_new.y, "Position changed: (%d,%d)\n", pt.x, pt.y); - - UnhookWindowsHookEx(hook2); -+ hook1 = SetWindowsHookExA(WH_MOUSE_LL, hook_proc3, GetModuleHandleA(0), 0); -+ -+ SetRect(&rc, 150, 150, 150, 150); -+ ClipCursor(&rc); -+ clipped = TRUE; -+ -+ SetCursorPos(140, 140); -+ GetCursorPos(&pt_old); -+ ok(pt_old.x == 150 && pt_old.y == 150, "Wrong new pos: (%d,%d)\n", pt_old.x, pt_old.y); -+ SetCursorPos(160, 160); -+ GetCursorPos(&pt_old); -+ todo_wine -+ ok(pt_old.x == 149 && pt_old.y == 149, "Wrong new pos: (%d,%d)\n", pt_old.x, pt_old.y); -+ mouse_event(MOUSEEVENTF_MOVE, -STEP, -STEP, 0, 0); -+ GetCursorPos(&pt_old); -+ ok(pt_old.x == 150 && pt_old.y == 150, "Wrong new pos: (%d,%d)\n", pt_old.x, pt_old.y); -+ mouse_event(MOUSEEVENTF_MOVE, +STEP, +STEP, 0, 0); -+ GetCursorPos(&pt_old); -+ todo_wine -+ ok(pt_old.x == 149 && pt_old.y == 149, "Wrong new pos: (%d,%d)\n", pt_old.x, pt_old.y); -+ mouse_event(MOUSEEVENTF_MOVE, 0, 0, 0, 0); -+ GetCursorPos(&pt_old); -+ ok(pt_old.x == 150 && pt_old.y == 150, "Wrong new pos: (%d,%d)\n", pt_old.x, pt_old.y); -+ mouse_event(MOUSEEVENTF_MOVE, 0, 0, 0, 0); -+ GetCursorPos(&pt_old); -+ todo_wine -+ ok(pt_old.x == 149 && pt_old.y == 149, "Wrong new pos: (%d,%d)\n", pt_old.x, pt_old.y); -+ -+ clipped = FALSE; -+ ClipCursor(NULL); -+ -+ SetCursorPos(140, 140); -+ SetRect(&rc, 150, 150, 150, 150); -+ ClipCursor(&rc); -+ GetCursorPos(&pt_old); -+ ok(pt_old.x == 150 && pt_old.y == 150, "Wrong new pos: (%d,%d)\n", pt_old.x, pt_old.y); -+ ClipCursor(NULL); -+ -+ SetCursorPos(160, 160); -+ SetRect(&rc, 150, 150, 150, 150); -+ ClipCursor(&rc); -+ GetCursorPos(&pt_old); -+ todo_wine -+ ok(pt_old.x == 149 && pt_old.y == 149, "Wrong new pos: (%d,%d)\n", pt_old.x, pt_old.y); -+ ClipCursor(NULL); -+ -+ SetCursorPos(150, 150); -+ SetRect(&rc, 150, 150, 150, 150); -+ ClipCursor(&rc); -+ GetCursorPos(&pt_old); -+ todo_wine -+ ok(pt_old.x == 149 && pt_old.y == 149, "Wrong new pos: (%d,%d)\n", pt_old.x, pt_old.y); -+ ClipCursor(NULL); -+ -+ UnhookWindowsHookEx(hook1); -+ - done: - DestroyWindow(hwnd); - SetCursorPos(pt_org.x, pt_org.y); -diff --git a/server/queue.c b/server/queue.c -index 752ab49e8d5..fb8a2e55bba 100644 ---- a/server/queue.c -+++ b/server/queue.c -@@ -445,8 +445,8 @@ static void set_clip_rectangle( struct desktop *desktop, const rectangle_t *rect - post_desktop_message( desktop, desktop->cursor.clip_msg, rect != NULL, 0 ); - - /* warp the mouse to be inside the clip rect */ -- x = min( max( desktop->cursor.x, desktop->cursor.clip.left ), desktop->cursor.clip.right-1 ); -- y = min( max( desktop->cursor.y, desktop->cursor.clip.top ), desktop->cursor.clip.bottom-1 ); -+ x = max( min( desktop->cursor.x, desktop->cursor.clip.right-1 ), desktop->cursor.clip.left ); -+ y = max( min( desktop->cursor.y, desktop->cursor.clip.bottom-1 ), desktop->cursor.clip.top ); - if (x != desktop->cursor.x || y != desktop->cursor.y) set_cursor_pos( desktop, x, y ); - } - -@@ -1605,8 +1605,8 @@ static void queue_hardware_message( struct desktop *desktop, struct message *msg - { - if (msg->msg == WM_MOUSEMOVE) - { -- int x = min( max( msg->x, desktop->cursor.clip.left ), desktop->cursor.clip.right-1 ); -- int y = min( max( msg->y, desktop->cursor.clip.top ), desktop->cursor.clip.bottom-1 ); -+ int x = max( min( msg->x, desktop->cursor.clip.right-1 ), desktop->cursor.clip.left ); -+ int y = max( min( msg->y, desktop->cursor.clip.bottom-1 ), desktop->cursor.clip.top ); - if (desktop->cursor.x != x || desktop->cursor.y != y) always_queue = 1; - desktop->cursor.x = x; - desktop->cursor.y = y; --- -2.13.1 - diff --git a/patches/server-ClipCursor/definition b/patches/server-ClipCursor/definition deleted file mode 100644 index ed63ca42..00000000 --- a/patches/server-ClipCursor/definition +++ /dev/null @@ -1,2 +0,0 @@ -Fixes: [38791] Fix handling of cursor position clipping -# FIXME: Related to bug 42631? diff --git a/patches/server-Shared_Memory/definition b/patches/server-Shared_Memory/definition index 7d24735e..d2a3d770 100644 --- a/patches/server-Shared_Memory/definition +++ b/patches/server-Shared_Memory/definition @@ -1,5 +1,4 @@ Depends: ntdll-Threading Depends: server-Key_State Depends: server-PeekMessage -Depends: server-ClipCursor Depends: server-Signal_Thread diff --git a/patches/user32-minimized_windows/0001-user32-tests-Add-tests-for-GetWindowPlacement-and-Se.patch b/patches/user32-minimized_windows/0001-user32-tests-Add-tests-for-GetWindowPlacement-and-Se.patch deleted file mode 100644 index 5a7e9f83..00000000 --- a/patches/user32-minimized_windows/0001-user32-tests-Add-tests-for-GetWindowPlacement-and-Se.patch +++ /dev/null @@ -1,224 +0,0 @@ -From b80ed82abdd82dcf8fe40c7618db978ebb094ecc Mon Sep 17 00:00:00 2001 -From: Zebediah Figura -Date: Wed, 19 Dec 2018 10:31:22 -0600 -Subject: [PATCH 01/15] user32/tests: Add tests for GetWindowPlacement() and - SetWindowPlacement(). - -Signed-off-by: Zebediah Figura ---- - dlls/user32/tests/win.c | 192 ++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 192 insertions(+) - -diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c -index 94eff5ee4f..85b2b3a514 100644 ---- a/dlls/user32/tests/win.c -+++ b/dlls/user32/tests/win.c -@@ -10721,6 +10721,197 @@ static void test_IsWindowEnabled(void) - DestroyWindow(hwnd); - } - -+static void test_window_placement(void) -+{ -+ RECT orig = {100, 200, 300, 400}, orig2 = {200, 300, 400, 500}, rect; -+ WINDOWPLACEMENT wp = {sizeof(wp)}; -+ HWND hwnd; -+ BOOL ret; -+ -+ hwnd = CreateWindowA("MainWindowClass", "wp", WS_OVERLAPPEDWINDOW, -+ orig.left, orig.top, orig.right - orig.left, orig.bottom - orig.top, 0, 0, 0, 0); -+ ok(!!hwnd, "failed to create window, error %u\n", GetLastError()); -+ -+ ret = GetWindowPlacement(hwnd, &wp); -+ ok(ret, "failed to get window placement, error %u\n", GetLastError()); -+ ok(wp.showCmd == SW_SHOWNORMAL, "got show cmd %u\n", wp.showCmd); -+ ok(wp.ptMinPosition.x == -1 && wp.ptMinPosition.y == -1, -+ "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); -+ ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1, -+ "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); -+ ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n", -+ wine_dbgstr_rect(&wp.rcNormalPosition)); -+ -+ ShowWindow(hwnd, SW_MINIMIZE); -+ -+ ret = GetWindowPlacement(hwnd, &wp); -+ ok(ret, "failed to get window placement, error %u\n", GetLastError()); -+ ok(!wp.flags, "got flags %#x\n", wp.flags); -+ ok(wp.showCmd == SW_SHOWMINIMIZED, "got show cmd %u\n", wp.showCmd); -+ ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000, -+ "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); -+ ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1, -+ "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); -+ ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n", -+ wine_dbgstr_rect(&wp.rcNormalPosition)); -+ -+ ShowWindow(hwnd, SW_RESTORE); -+ -+ ret = GetWindowPlacement(hwnd, &wp); -+ ok(ret, "failed to get window placement, error %u\n", GetLastError()); -+ ok(wp.showCmd == SW_SHOWNORMAL, "got show cmd %u\n", wp.showCmd); -+ ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000, -+ "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); -+ ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1, -+ "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); -+ ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n", -+ wine_dbgstr_rect(&wp.rcNormalPosition)); -+ -+ ShowWindow(hwnd, SW_MAXIMIZE); -+ -+ ret = GetWindowPlacement(hwnd, &wp); -+ ok(ret, "failed to get window placement, error %u\n", GetLastError()); -+ ok(wp.showCmd == SW_SHOWMAXIMIZED, "got show cmd %u\n", wp.showCmd); -+ ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000, -+ "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); -+todo_wine -+ ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1, -+ "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); -+ ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n", -+ wine_dbgstr_rect(&wp.rcNormalPosition)); -+ -+ SetWindowPos(hwnd, 0, 100, 100, 100, 100, SWP_NOZORDER | SWP_NOACTIVATE); -+ -+ ret = GetWindowPlacement(hwnd, &wp); -+ ok(ret, "failed to get window placement, error %u\n", GetLastError()); -+ ok(wp.showCmd == SW_SHOWMAXIMIZED, "got show cmd %u\n", wp.showCmd); -+ ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000, -+ "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); -+ ok(wp.ptMaxPosition.x == 100 && wp.ptMaxPosition.y == 100, -+ "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); -+ ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n", -+ wine_dbgstr_rect(&wp.rcNormalPosition)); -+ -+ ShowWindow(hwnd, SW_MINIMIZE); -+ -+ ret = GetWindowPlacement(hwnd, &wp); -+ ok(ret, "failed to get window placement, error %u\n", GetLastError()); -+ ok(wp.flags == WPF_RESTORETOMAXIMIZED, "got flags %#x\n", wp.flags); -+ ok(wp.showCmd == SW_SHOWMINIMIZED, "got show cmd %u\n", wp.showCmd); -+ ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000, -+ "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); -+todo_wine -+ ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1, -+ "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); -+ ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n", -+ wine_dbgstr_rect(&wp.rcNormalPosition)); -+ -+ ShowWindow(hwnd, SW_RESTORE); -+ -+ ret = GetWindowPlacement(hwnd, &wp); -+ ok(ret, "failed to get window placement, error %u\n", GetLastError()); -+ ok(wp.showCmd == SW_SHOWMAXIMIZED, "got show cmd %u\n", wp.showCmd); -+ ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000, -+ "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); -+todo_wine -+ ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1, -+ "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); -+ ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n", -+ wine_dbgstr_rect(&wp.rcNormalPosition)); -+ -+ ShowWindow(hwnd, SW_RESTORE); -+ -+ ret = GetWindowPlacement(hwnd, &wp); -+ ok(ret, "failed to get window placement, error %u\n", GetLastError()); -+ ok(wp.showCmd == SW_SHOWNORMAL, "got show cmd %u\n", wp.showCmd); -+ ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000, -+ "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); -+todo_wine -+ ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1, -+ "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); -+ ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n", -+ wine_dbgstr_rect(&wp.rcNormalPosition)); -+ -+ wp.flags = WPF_SETMINPOSITION; -+ wp.ptMinPosition.x = wp.ptMinPosition.y = 100; -+ wp.ptMaxPosition.x = wp.ptMaxPosition.y = 100; -+ wp.rcNormalPosition = orig2; -+ ret = SetWindowPlacement(hwnd, &wp); -+ ok(ret, "failed to set window placement, error %u\n", GetLastError()); -+ -+ ret = GetWindowPlacement(hwnd, &wp); -+ ok(ret, "failed to get window placement, error %u\n", GetLastError()); -+ ok(wp.showCmd == SW_SHOWNORMAL, "got show cmd %u\n", wp.showCmd); -+ ok(wp.ptMinPosition.x == 100 && wp.ptMinPosition.y == 100, -+ "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); -+todo_wine -+ ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1, -+ "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); -+ ok(EqualRect(&wp.rcNormalPosition, &orig2), "got normal pos %s\n", -+ wine_dbgstr_rect(&wp.rcNormalPosition)); -+ GetWindowRect(hwnd, &rect); -+ ok(EqualRect(&rect, &orig2), "got window rect %s\n", wine_dbgstr_rect(&rect)); -+ -+ ShowWindow(hwnd, SW_MINIMIZE); -+ -+ ret = GetWindowPlacement(hwnd, &wp); -+ ok(ret, "failed to get window placement, error %u\n", GetLastError()); -+ ok(!wp.flags, "got flags %#x\n", wp.flags); -+ ok(wp.showCmd == SW_SHOWMINIMIZED, "got show cmd %u\n", wp.showCmd); -+ ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000, -+ "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); -+todo_wine -+ ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1, -+ "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); -+ ok(EqualRect(&wp.rcNormalPosition, &orig2), "got normal pos %s\n", -+ wine_dbgstr_rect(&wp.rcNormalPosition)); -+ -+ ShowWindow(hwnd, SW_RESTORE); -+ -+ wp.flags = WPF_SETMINPOSITION; -+ wp.showCmd = SW_MINIMIZE; -+ wp.ptMinPosition.x = wp.ptMinPosition.y = 100; -+ wp.ptMaxPosition.x = wp.ptMaxPosition.y = 100; -+ wp.rcNormalPosition = orig; -+ ret = SetWindowPlacement(hwnd, &wp); -+ ok(ret, "failed to set window placement, error %u\n", GetLastError()); -+ -+ ret = GetWindowPlacement(hwnd, &wp); -+ ok(ret, "failed to get window placement, error %u\n", GetLastError()); -+ ok(!wp.flags, "got flags %#x\n", wp.flags); -+ ok(wp.showCmd == SW_SHOWMINIMIZED, "got show cmd %u\n", wp.showCmd); -+ ok(wp.ptMinPosition.x == -32000 && wp.ptMinPosition.y == -32000, -+ "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); -+todo_wine -+ ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1, -+ "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); -+ ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n", -+ wine_dbgstr_rect(&wp.rcNormalPosition)); -+ -+ ShowWindow(hwnd, SW_RESTORE); -+ -+ wp.flags = WPF_SETMINPOSITION; -+ wp.showCmd = SW_MAXIMIZE; -+ wp.ptMinPosition.x = wp.ptMinPosition.y = 100; -+ wp.ptMaxPosition.x = wp.ptMaxPosition.y = 100; -+ wp.rcNormalPosition = orig; -+ ret = SetWindowPlacement(hwnd, &wp); -+ ok(ret, "failed to set window placement, error %u\n", GetLastError()); -+ -+ ret = GetWindowPlacement(hwnd, &wp); -+ ok(ret, "failed to get window placement, error %u\n", GetLastError()); -+ ok(wp.showCmd == SW_SHOWMAXIMIZED, "got show cmd %u\n", wp.showCmd); -+ ok(wp.ptMinPosition.x == 100 && wp.ptMinPosition.y == 100, -+ "got minimized pos (%d,%d)\n", wp.ptMinPosition.x, wp.ptMinPosition.y); -+todo_wine -+ ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1, -+ "got maximized pos (%d,%d)\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); -+ ok(EqualRect(&wp.rcNormalPosition, &orig), "got normal pos %s\n", -+ wine_dbgstr_rect(&wp.rcNormalPosition)); -+ -+ DestroyWindow(hwnd); -+} -+ - START_TEST(win) - { - char **argv; -@@ -10878,6 +11069,7 @@ START_TEST(win) - test_minimize_window(hwndMain); - test_destroy_quit(); - test_IsWindowEnabled(); -+ test_window_placement(); - - /* add the tests above this line */ - if (hhook) UnhookWindowsHookEx(hhook); --- -2.19.2 - diff --git a/patches/user32-minimized_windows/0006-user32-tests-Add-tests-for-maximizing-and-minimizing.patch b/patches/user32-minimized_windows/0006-user32-tests-Add-tests-for-maximizing-and-minimizing.patch deleted file mode 100644 index 5218c349..00000000 --- a/patches/user32-minimized_windows/0006-user32-tests-Add-tests-for-maximizing-and-minimizing.patch +++ /dev/null @@ -1,157 +0,0 @@ -From a2b9a0b19756843a345ed1cd0a9021f438bf2a3c Mon Sep 17 00:00:00 2001 -From: Zebediah Figura -Date: Wed, 20 Dec 2017 14:24:50 -0600 -Subject: [PATCH 06/15] user32/tests: Add tests for maximizing and minimizing - owned windows. - -Signed-off-by: Zebediah Figura ---- - dlls/user32/tests/win.c | 125 ++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 125 insertions(+) - -diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c -index 2687702ed8..f40f4057a1 100644 ---- a/dlls/user32/tests/win.c -+++ b/dlls/user32/tests/win.c -@@ -6680,6 +6680,130 @@ static void test_ShowWindow(void) - flush_events(TRUE); - } - -+static void test_ShowWindow_owned(HWND hwndMain) -+{ -+ MONITORINFO mon_info = {sizeof(mon_info)}; -+ RECT rect, orig, expect; -+ BOOL ret; -+ HWND hwnd, hwnd2; -+ LONG style; -+ -+ GetMonitorInfoW(MonitorFromWindow(hwndMain, MONITOR_DEFAULTTOPRIMARY), &mon_info); -+ SetRect(&orig, 20, 20, 210, 110); -+ hwnd = CreateWindowA("MainWindowClass", "owned", WS_CAPTION | WS_SYSMENU | -+ WS_MINIMIZEBOX | WS_MAXIMIZEBOX, -+ orig.left, orig.top, orig.right - orig.left, -+ orig.bottom - orig.top, hwndMain, 0, 0, NULL); -+ ok(!!hwnd, "failed to create window, error %u\n", GetLastError()); -+ hwnd2 = CreateWindowA("MainWindowClass", "owned2", WS_CAPTION | WS_SYSMENU | -+ WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_VISIBLE, -+ orig.left, orig.top, orig.right - orig.left, -+ orig.bottom - orig.top, hwndMain, 0, 0, NULL); -+ ok(!!hwnd2, "failed to create window, error %u\n", GetLastError()); -+ -+ style = GetWindowLongA(hwnd, GWL_STYLE); -+ ok(!(style & WS_DISABLED), "window should not be disabled\n"); -+ ok(!(style & WS_VISIBLE), "window should not be visible\n"); -+ ok(!(style & WS_MINIMIZE), "window should not be minimized\n"); -+ ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); -+ GetWindowRect(hwnd, &rect); -+ ok(EqualRect(&orig, &rect), "expected %s, got %s\n", -+ wine_dbgstr_rect(&orig), wine_dbgstr_rect(&rect)); -+ -+ ret = ShowWindow(hwnd, SW_SHOW); -+ ok(!ret, "wrong ret %d\n", ret); -+ style = GetWindowLongA(hwnd, GWL_STYLE); -+ ok(!(style & WS_DISABLED), "window should not be disabled\n"); -+ ok(style & WS_VISIBLE, "window should be visible\n"); -+ ok(!(style & WS_MINIMIZE), "window should not be minimized\n"); -+ ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); -+ GetWindowRect(hwnd, &rect); -+ ok(EqualRect(&orig, &rect), "expected %s, got %s\n", -+ wine_dbgstr_rect(&orig), wine_dbgstr_rect(&rect)); -+ -+ ret = ShowWindow(hwnd, SW_MINIMIZE); -+ ok(ret, "wrong ret %d\n", ret); -+ style = GetWindowLongA(hwnd, GWL_STYLE); -+ ok(!(style & WS_DISABLED), "window should not be disabled\n"); -+ ok(style & WS_VISIBLE, "window should be visible\n"); -+ ok(style & WS_MINIMIZE, "window should be minimized\n"); -+ ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); -+ GetWindowRect(hwnd, &rect); -+ SetRect(&expect, 0, mon_info.rcWork.bottom - GetSystemMetrics(SM_CYMINIMIZED), -+ GetSystemMetrics(SM_CXMINIMIZED), mon_info.rcWork.bottom); -+ todo_wine -+ ok(EqualRect(&expect, &rect), "expected %s, got %s\n", -+ wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); -+ /* shouldn't be able to resize minimized windows */ -+ ret = SetWindowPos(hwnd, 0, 0, 0, 200, 200, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER); -+ ok(ret, "wrong ret %d\n", ret); -+ GetWindowRect(hwnd, &rect); -+ todo_wine -+ ok(EqualRect(&expect, &rect), "expected %s, got %s\n", -+ wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); -+ -+ /* multiple minimized owned windows stack next to each other (and eventually -+ * on top of each other) */ -+ OffsetRect(&expect, GetSystemMetrics(SM_CXMINIMIZED), 0); -+ ret = ShowWindow(hwnd2, SW_MINIMIZE); -+ ok(ret, "wrong ret %d\n", ret); -+ style = GetWindowLongA(hwnd2, GWL_STYLE); -+ ok(!(style & WS_DISABLED), "window should not be disabled\n"); -+ ok(style & WS_VISIBLE, "window should be visible\n"); -+ ok(style & WS_MINIMIZE, "window should be minimized\n"); -+ ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); -+ GetWindowRect(hwnd2, &rect); -+ todo_wine -+ ok(EqualRect(&expect, &rect), "expected %s, got %s\n", -+ wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); -+ -+ ShowWindow(hwnd, SW_RESTORE); -+ ok(ret, "wrong ret %d\n", ret); -+ style = GetWindowLongA(hwnd, GWL_STYLE); -+ ok(!(style & WS_DISABLED), "window should not be disabled\n"); -+ ok(style & WS_VISIBLE, "window should be visible\n"); -+ ok(!(style & WS_MINIMIZE), "window should not be minimized\n"); -+ ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); -+ GetWindowRect(hwnd, &rect); -+ ok(EqualRect(&orig, &rect), "expected %s, got %s\n", -+ wine_dbgstr_rect(&orig), wine_dbgstr_rect(&rect)); -+ -+ ShowWindow(hwnd, SW_MAXIMIZE); -+ ok(ret, "wrong ret %d\n", ret); -+ style = GetWindowLongA(hwnd, GWL_STYLE); -+ ok(!(style & WS_DISABLED), "window should not be disabled\n"); -+ ok(style & WS_VISIBLE, "window should be visible\n"); -+ ok(!(style & WS_MINIMIZE), "window should be minimized\n"); -+ ok(style & WS_MAXIMIZE, "window should not be maximized\n"); -+ GetWindowRect(hwnd, &rect); -+ expect = mon_info.rcWork; -+ AdjustWindowRectEx(&expect, GetWindowLongA(hwnd, GWL_STYLE) & ~WS_BORDER, -+ 0, GetWindowLongA(hwnd, GWL_EXSTYLE)); -+ ok(EqualRect(&expect, &rect), "expected %s, got %s\n", -+ wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); -+ /* maximized windows can be resized */ -+ ret = SetWindowPos(hwnd, 0, 300, 300, 200, 200, SWP_NOACTIVATE | SWP_NOZORDER); -+ ok(ret, "wrong ret %d\n", ret); -+ GetWindowRect(hwnd, &rect); -+ SetRect(&expect, 300, 300, 500, 500); -+ ok(EqualRect(&expect, &rect), "expected %s, got %s\n", -+ wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); -+ -+ ShowWindow(hwnd, SW_RESTORE); -+ ok(ret, "wrong ret %d\n", ret); -+ style = GetWindowLongA(hwnd, GWL_STYLE); -+ ok(!(style & WS_DISABLED), "window should not be disabled\n"); -+ ok(style & WS_VISIBLE, "window should be visible\n"); -+ ok(!(style & WS_MINIMIZE), "window should not be minimized\n"); -+ ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); -+ GetWindowRect(hwnd, &rect); -+ ok(EqualRect(&orig, &rect), "expected %s, got %s\n", -+ wine_dbgstr_rect(&orig), wine_dbgstr_rect(&rect)); -+ -+ DestroyWindow(hwnd2); -+ DestroyWindow(hwnd); -+} -+ - static DWORD CALLBACK enablewindow_thread(LPVOID arg) - { - HWND hwnd = arg; -@@ -11054,6 +11178,7 @@ START_TEST(win) - test_SetWindowLong(); - test_set_window_style(); - test_ShowWindow(); -+ test_ShowWindow_owned(hwndMain); - test_EnableWindow(); - test_gettext(); - test_GetUpdateRect(); --- -2.19.2 - diff --git a/patches/user32-minimized_windows/0007-user32-tests-Add-tests-for-maximizing-and-minimizing.patch b/patches/user32-minimized_windows/0007-user32-tests-Add-tests-for-maximizing-and-minimizing.patch deleted file mode 100644 index e0aad2c3..00000000 --- a/patches/user32-minimized_windows/0007-user32-tests-Add-tests-for-maximizing-and-minimizing.patch +++ /dev/null @@ -1,163 +0,0 @@ -From 703fc352f012c3edd1495937ff3b29bcbeeb90c6 Mon Sep 17 00:00:00 2001 -From: Zebediah Figura -Date: Wed, 20 Dec 2017 23:08:28 -0600 -Subject: [PATCH 07/15] user32/tests: Add tests for maximizing and minimizing - child windows. - -Signed-off-by: Zebediah Figura ---- - dlls/user32/tests/win.c | 131 ++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 131 insertions(+) - -diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c -index f40f4057a1..9153789d34 100644 ---- a/dlls/user32/tests/win.c -+++ b/dlls/user32/tests/win.c -@@ -6804,6 +6804,136 @@ static void test_ShowWindow_owned(HWND hwndMain) - DestroyWindow(hwnd); - } - -+static void test_ShowWindow_child(HWND hwndMain) -+{ -+ RECT rect, orig, expect; -+ BOOL ret; -+ HWND hwnd, hwnd2; -+ LONG style; -+ POINT pt = {0}; -+ -+ SetRect(&orig, 20, 20, 210, 110); -+ hwnd = CreateWindowA("MainWindowClass", "child", WS_CAPTION | WS_SYSMENU | -+ WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_CHILD, -+ orig.left, orig.top, orig.right - orig.left, -+ orig.bottom - orig.top, hwndMain, 0, 0, NULL); -+ ok(!!hwnd, "failed to create window, error %u\n", GetLastError()); -+ hwnd2 = CreateWindowA("MainWindowClass", "child2", WS_CAPTION | WS_SYSMENU | -+ WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_CHILD | WS_VISIBLE, -+ orig.left, orig.top, orig.right - orig.left, -+ orig.bottom - orig.top, hwndMain, 0, 0, NULL); -+ ok(!!hwnd2, "failed to create window, error %u\n", GetLastError()); -+ -+ ClientToScreen(hwndMain, &pt); -+ OffsetRect(&orig, pt.x, pt.y); -+ -+ style = GetWindowLongA(hwnd, GWL_STYLE); -+ ok(!(style & WS_DISABLED), "window should not be disabled\n"); -+ ok(!(style & WS_VISIBLE), "window should not be visible\n"); -+ ok(!(style & WS_MINIMIZE), "window should not be minimized\n"); -+ ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); -+ GetWindowRect(hwnd, &rect); -+ ok(EqualRect(&orig, &rect), "expected %s, got %s\n", -+ wine_dbgstr_rect(&orig), wine_dbgstr_rect(&rect)); -+ -+ ret = ShowWindow(hwnd, SW_SHOW); -+ ok(!ret, "wrong ret %d\n", ret); -+ style = GetWindowLongA(hwnd, GWL_STYLE); -+ ok(!(style & WS_DISABLED), "window should not be disabled\n"); -+ ok(style & WS_VISIBLE, "window should be visible\n"); -+ ok(!(style & WS_MINIMIZE), "window should not be minimized\n"); -+ ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); -+ GetWindowRect(hwnd, &rect); -+ ok(EqualRect(&orig, &rect), "expected %s, got %s\n", -+ wine_dbgstr_rect(&orig), wine_dbgstr_rect(&rect)); -+ -+ ret = ShowWindow(hwnd, SW_MINIMIZE); -+ ok(ret, "wrong ret %d\n", ret); -+ style = GetWindowLongA(hwnd, GWL_STYLE); -+ ok(!(style & WS_DISABLED), "window should not be disabled\n"); -+ ok(style & WS_VISIBLE, "window should be visible\n"); -+ ok(style & WS_MINIMIZE, "window should be minimized\n"); -+ ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); -+ GetWindowRect(hwnd, &rect); -+ GetClientRect(hwndMain, &expect); -+ SetRect(&expect, 0, expect.bottom - GetSystemMetrics(SM_CYMINIMIZED), -+ GetSystemMetrics(SM_CXMINIMIZED), expect.bottom); -+ OffsetRect(&expect, pt.x, pt.y); -+ todo_wine -+ ok(EqualRect(&expect, &rect), "expected %s, got %s\n", -+ wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); -+ /* shouldn't be able to resize minimized windows */ -+ ret = SetWindowPos(hwnd, 0, 0, 0, 200, 200, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER); -+ ok(ret, "wrong ret %d\n", ret); -+ GetWindowRect(hwnd, &rect); -+ todo_wine -+ ok(EqualRect(&expect, &rect), "expected %s, got %s\n", -+ wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); -+ -+ /* multiple minimized children also stack; here the parent is too small to -+ * fit more than one per row */ -+ OffsetRect(&expect, 0, -GetSystemMetrics(SM_CYMINIMIZED)); -+ ret = ShowWindow(hwnd2, SW_MINIMIZE); -+ ok(ret, "wrong ret %d\n", ret); -+ style = GetWindowLongA(hwnd2, GWL_STYLE); -+ ok(!(style & WS_DISABLED), "window should not be disabled\n"); -+ ok(style & WS_VISIBLE, "window should be visible\n"); -+ ok(style & WS_MINIMIZE, "window should be minimized\n"); -+ ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); -+ GetWindowRect(hwnd2, &rect); -+ todo_wine -+ ok(EqualRect(&expect, &rect), "expected %s, got %s\n", -+ wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); -+ -+ ShowWindow(hwnd, SW_RESTORE); -+ ok(ret, "wrong ret %d\n", ret); -+ style = GetWindowLongA(hwnd, GWL_STYLE); -+ ok(!(style & WS_DISABLED), "window should not be disabled\n"); -+ ok(style & WS_VISIBLE, "window should be visible\n"); -+ ok(!(style & WS_MINIMIZE), "window should not be minimized\n"); -+ ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); -+ GetWindowRect(hwnd, &rect); -+ ok(EqualRect(&orig, &rect), "expected %s, got %s\n", -+ wine_dbgstr_rect(&orig), wine_dbgstr_rect(&rect)); -+ -+ ShowWindow(hwnd, SW_MAXIMIZE); -+ ok(ret, "wrong ret %d\n", ret); -+ style = GetWindowLongA(hwnd, GWL_STYLE); -+ ok(!(style & WS_DISABLED), "window should not be disabled\n"); -+ ok(style & WS_VISIBLE, "window should be visible\n"); -+ ok(!(style & WS_MINIMIZE), "window should be minimized\n"); -+ ok(style & WS_MAXIMIZE, "window should not be maximized\n"); -+ GetWindowRect(hwnd, &rect); -+ GetClientRect(hwndMain, &expect); -+ AdjustWindowRectEx(&expect, GetWindowLongA(hwnd, GWL_STYLE) & ~WS_BORDER, -+ 0, GetWindowLongA(hwnd, GWL_EXSTYLE)); -+ OffsetRect(&expect, pt.x, pt.y); -+ ok(EqualRect(&expect, &rect), "expected %s, got %s\n", -+ wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); -+ /* maximized windows can be resized */ -+ ret = SetWindowPos(hwnd, 0, 300, 300, 200, 200, SWP_NOACTIVATE | SWP_NOZORDER); -+ ok(ret, "wrong ret %d\n", ret); -+ GetWindowRect(hwnd, &rect); -+ SetRect(&expect, 300, 300, 500, 500); -+ OffsetRect(&expect, pt.x, pt.y); -+ ok(EqualRect(&expect, &rect), "expected %s, got %s\n", -+ wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); -+ -+ ShowWindow(hwnd, SW_RESTORE); -+ ok(ret, "wrong ret %d\n", ret); -+ style = GetWindowLongA(hwnd, GWL_STYLE); -+ ok(!(style & WS_DISABLED), "window should not be disabled\n"); -+ ok(style & WS_VISIBLE, "window should be visible\n"); -+ ok(!(style & WS_MINIMIZE), "window should not be minimized\n"); -+ ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); -+ GetWindowRect(hwnd, &rect); -+ ok(EqualRect(&orig, &rect), "expected %s, got %s\n", -+ wine_dbgstr_rect(&orig), wine_dbgstr_rect(&rect)); -+ -+ DestroyWindow(hwnd2); -+ DestroyWindow(hwnd); -+} -+ - static DWORD CALLBACK enablewindow_thread(LPVOID arg) - { - HWND hwnd = arg; -@@ -11179,6 +11309,7 @@ START_TEST(win) - test_set_window_style(); - test_ShowWindow(); - test_ShowWindow_owned(hwndMain); -+ test_ShowWindow_child(hwndMain); - test_EnableWindow(); - test_gettext(); - test_GetUpdateRect(); --- -2.19.2 - diff --git a/patches/user32-minimized_windows/0008-user32-tests-Add-tests-for-maximizing-and-minimizing.patch b/patches/user32-minimized_windows/0008-user32-tests-Add-tests-for-maximizing-and-minimizing.patch deleted file mode 100644 index cc1bd907..00000000 --- a/patches/user32-minimized_windows/0008-user32-tests-Add-tests-for-maximizing-and-minimizing.patch +++ /dev/null @@ -1,159 +0,0 @@ -From 63f66f2673889555c1483d5d52cae3a639084f43 Mon Sep 17 00:00:00 2001 -From: Zebediah Figura -Date: Mon, 17 Dec 2018 23:23:27 -0600 -Subject: [PATCH 08/15] user32/tests: Add tests for maximizing and minimizing - MDI child windows. - -Signed-off-by: Zebediah Figura ---- - dlls/user32/tests/win.c | 127 ++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 127 insertions(+) - -diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c -index 9153789d34..0026454838 100644 ---- a/dlls/user32/tests/win.c -+++ b/dlls/user32/tests/win.c -@@ -6934,6 +6934,132 @@ static void test_ShowWindow_child(HWND hwndMain) - DestroyWindow(hwnd); - } - -+static void test_ShowWindow_mdichild(HWND hwndMain) -+{ -+ RECT rect, orig, expect; -+ BOOL ret; -+ HWND mdiclient, hwnd, hwnd2; -+ LONG style; -+ POINT pt = {0}; -+ CLIENTCREATESTRUCT mdi_client_cs = {0,1}; -+ -+ SetRect(&orig, 20, 20, 210, 110); -+ GetClientRect(hwndMain, &rect); -+ mdiclient = CreateWindowA("mdiclient", "MDI client", WS_CHILD, -+ rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, -+ hwndMain, 0, 0, &mdi_client_cs); -+ ok(!!mdiclient, "failed to create window, error %u\n", GetLastError()); -+ hwnd = CreateWindowExA(WS_EX_MDICHILD, "MainWindowClass", "MDI child", -+ WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX, -+ orig.left, orig.top, orig.right - orig.left, -+ orig.bottom - orig.top, mdiclient, 0, 0, NULL); -+ ok(!!hwnd, "failed to create window, error %u\n", GetLastError()); -+ hwnd2 = CreateWindowExA(WS_EX_MDICHILD, "MainWindowClass", "MDI child 2", -+ WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX, -+ orig.left, orig.top, orig.right - orig.left, -+ orig.bottom - orig.top, mdiclient, 0, 0, NULL); -+ ok(!!hwnd2, "failed to create window, error %u\n", GetLastError()); -+ -+ ClientToScreen(hwndMain, &pt); -+ OffsetRect(&orig, pt.x, pt.y); -+ -+ style = GetWindowLongA(hwnd, GWL_STYLE); -+ ok(!(style & WS_DISABLED), "window should not be disabled\n"); -+ ok(style & WS_VISIBLE, "window should not be visible\n"); -+ ok(!(style & WS_MINIMIZE), "window should not be minimized\n"); -+ ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); -+ GetWindowRect(hwnd, &rect); -+ ok(EqualRect(&orig, &rect), "expected %s, got %s\n", -+ wine_dbgstr_rect(&orig), wine_dbgstr_rect(&rect)); -+ -+ ret = ShowWindow(hwnd, SW_MINIMIZE); -+ ok(ret, "wrong ret %d\n", ret); -+ style = GetWindowLongA(hwnd, GWL_STYLE); -+ ok(!(style & WS_DISABLED), "window should not be disabled\n"); -+ ok(style & WS_VISIBLE, "window should be visible\n"); -+ ok(style & WS_MINIMIZE, "window should be minimized\n"); -+ ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); -+ GetWindowRect(hwnd, &rect); -+ GetClientRect(hwndMain, &expect); -+ SetRect(&expect, 0, expect.bottom - GetSystemMetrics(SM_CYMINIMIZED), -+ GetSystemMetrics(SM_CXMINIMIZED), expect.bottom); -+ OffsetRect(&expect, pt.x, pt.y); -+ todo_wine -+ ok(EqualRect(&expect, &rect), "expected %s, got %s\n", -+ wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); -+ /* shouldn't be able to resize minimized windows */ -+ ret = SetWindowPos(hwnd, 0, 0, 0, 200, 200, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER); -+ ok(ret, "wrong ret %d\n", ret); -+ GetWindowRect(hwnd, &rect); -+ todo_wine -+ ok(EqualRect(&expect, &rect), "expected %s, got %s\n", -+ wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); -+ -+ /* multiple minimized children also stack; here the parent is too small to -+ * fit more than one per row */ -+ OffsetRect(&expect, 0, -GetSystemMetrics(SM_CYMINIMIZED)); -+ ret = ShowWindow(hwnd2, SW_MINIMIZE); -+ ok(ret, "wrong ret %d\n", ret); -+ style = GetWindowLongA(hwnd2, GWL_STYLE); -+ ok(!(style & WS_DISABLED), "window should not be disabled\n"); -+ ok(style & WS_VISIBLE, "window should be visible\n"); -+ ok(style & WS_MINIMIZE, "window should be minimized\n"); -+ ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); -+ GetWindowRect(hwnd2, &rect); -+ todo_wine -+ ok(EqualRect(&expect, &rect), "expected %s, got %s\n", -+ wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); -+ -+ ShowWindow(hwnd, SW_RESTORE); -+ ok(ret, "wrong ret %d\n", ret); -+ style = GetWindowLongA(hwnd, GWL_STYLE); -+ ok(!(style & WS_DISABLED), "window should not be disabled\n"); -+ ok(style & WS_VISIBLE, "window should be visible\n"); -+ ok(!(style & WS_MINIMIZE), "window should not be minimized\n"); -+ ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); -+ GetWindowRect(hwnd, &rect); -+ ok(EqualRect(&orig, &rect), "expected %s, got %s\n", -+ wine_dbgstr_rect(&orig), wine_dbgstr_rect(&rect)); -+ -+ ShowWindow(hwnd, SW_MAXIMIZE); -+ ok(ret, "wrong ret %d\n", ret); -+ style = GetWindowLongA(hwnd, GWL_STYLE); -+ ok(!(style & WS_DISABLED), "window should not be disabled\n"); -+ ok(style & WS_VISIBLE, "window should be visible\n"); -+ ok(!(style & WS_MINIMIZE), "window should be minimized\n"); -+ ok(style & WS_MAXIMIZE, "window should not be maximized\n"); -+ GetWindowRect(hwnd, &rect); -+ GetClientRect(hwndMain, &expect); -+ AdjustWindowRectEx(&expect, GetWindowLongA(hwnd, GWL_STYLE) & ~WS_BORDER, -+ 0, GetWindowLongA(hwnd, GWL_EXSTYLE)); -+ OffsetRect(&expect, pt.x, pt.y); -+ ok(EqualRect(&expect, &rect), "expected %s, got %s\n", -+ wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); -+ /* maximized windows can be resized */ -+ ret = SetWindowPos(hwnd, 0, 300, 300, 200, 200, SWP_NOACTIVATE | SWP_NOZORDER); -+ ok(ret, "wrong ret %d\n", ret); -+ GetWindowRect(hwnd, &rect); -+ SetRect(&expect, 300, 300, 500, 500); -+ OffsetRect(&expect, pt.x, pt.y); -+ ok(EqualRect(&expect, &rect), "expected %s, got %s\n", -+ wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); -+ -+ ShowWindow(hwnd, SW_RESTORE); -+ ok(ret, "wrong ret %d\n", ret); -+ style = GetWindowLongA(hwnd, GWL_STYLE); -+ ok(!(style & WS_DISABLED), "window should not be disabled\n"); -+ ok(style & WS_VISIBLE, "window should be visible\n"); -+ ok(!(style & WS_MINIMIZE), "window should not be minimized\n"); -+ ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); -+ GetWindowRect(hwnd, &rect); -+ ok(EqualRect(&orig, &rect), "expected %s, got %s\n", -+ wine_dbgstr_rect(&orig), wine_dbgstr_rect(&rect)); -+ -+ DestroyWindow(hwnd2); -+ DestroyWindow(hwnd); -+ DestroyWindow(mdiclient); -+} -+ - static DWORD CALLBACK enablewindow_thread(LPVOID arg) - { - HWND hwnd = arg; -@@ -11310,6 +11436,7 @@ START_TEST(win) - test_ShowWindow(); - test_ShowWindow_owned(hwndMain); - test_ShowWindow_child(hwndMain); -+ test_ShowWindow_mdichild(hwndMain); - test_EnableWindow(); - test_gettext(); - test_GetUpdateRect(); --- -2.19.2 - diff --git a/patches/user32-minimized_windows/0009-user32-tests-Add-tests-for-ArrangeIconicWindows.patch b/patches/user32-minimized_windows/0009-user32-tests-Add-tests-for-ArrangeIconicWindows.patch deleted file mode 100644 index 6ae9168a..00000000 --- a/patches/user32-minimized_windows/0009-user32-tests-Add-tests-for-ArrangeIconicWindows.patch +++ /dev/null @@ -1,192 +0,0 @@ -From 5716e0d868c32fc287d2ae7779521eff7b2f722b Mon Sep 17 00:00:00 2001 -From: Zebediah Figura -Date: Tue, 18 Dec 2018 17:53:38 -0600 -Subject: [PATCH 09/15] user32/tests: Add tests for ArrangeIconicWindows(). - -Signed-off-by: Zebediah Figura ---- - dlls/user32/tests/win.c | 161 ++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 161 insertions(+) - -diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c -index 0026454838..a1224557ab 100644 ---- a/dlls/user32/tests/win.c -+++ b/dlls/user32/tests/win.c -@@ -11302,6 +11302,166 @@ todo_wine - DestroyWindow(hwnd); - } - -+static void test_arrange_iconic_windows(void) -+{ -+ MINIMIZEDMETRICS mm = {sizeof(mm)}, oldmm = {sizeof(oldmm)}; -+ RECT orig = {100, 200, 300, 400}, rect, expect, parent_rect; -+ POINT pt = {0}; -+ HWND parent, hwnds[10]; -+ UINT ret; -+ int i, row, col; -+ -+ parent = CreateWindowA("MainWindowClass", "parent", WS_OVERLAPPEDWINDOW, -+ 100, 200, 500, 300, NULL, 0, 0, NULL); -+ ok(!!parent, "failed to create window, error %u\n", GetLastError()); -+ -+ GetClientRect(parent, &parent_rect); -+ ClientToScreen(parent, &pt); -+ SystemParametersInfoA(SPI_GETMINIMIZEDMETRICS, sizeof(oldmm), &oldmm, 0); -+ -+ mm.iWidth = 100; -+ mm.iHorzGap = 40; -+ mm.iVertGap = 3; -+ mm.iArrange = ARW_TOPLEFT | ARW_RIGHT; -+ ret = SystemParametersInfoA(SPI_SETMINIMIZEDMETRICS, sizeof(mm), &mm, 0); -+ ok(ret, "failed to set minimized metrics, error %u\n", GetLastError()); -+ -+ SetLastError(0xdeadbeef); -+ ret = ArrangeIconicWindows(parent); -+todo_wine -+ ok(!ret, "wrong ret %u\n", ret); -+ ok(GetLastError() == 0xdeadbeef, "wrong error %u\n", GetLastError()); -+ -+ for (i = 0; i < ARRAY_SIZE(hwnds); ++i) -+ { -+ hwnds[i] = CreateWindowA("MainWindowClass", "child", WS_CHILD | -+ WS_OVERLAPPEDWINDOW, orig.left, orig.top, orig.right - orig.left, -+ orig.bottom - orig.top, parent, 0, 0, NULL); -+ ok(!!hwnds[i], "failed to create window %u, error %u\n", i, GetLastError()); -+ } -+ -+ SetLastError(0xdeadbeef); -+ ret = ArrangeIconicWindows(parent); -+todo_wine -+ ok(!ret, "wrong ret %u\n", ret); -+ ok(GetLastError() == 0xdeadbeef, "wrong error %u\n", GetLastError()); -+ -+ for (i = 0; i < ARRAY_SIZE(hwnds); ++i) -+ { -+ GetWindowRect(hwnds[i], &rect); -+ expect = orig; -+ OffsetRect(&expect, pt.x, pt.y); -+ ok(EqualRect(&rect, &expect), "hwnd %u: expected rect %s, got %s\n", i, -+ wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); -+ } -+ -+ ShowWindow(hwnds[0], SW_MINIMIZE); -+ -+ for (i = 0; i < ARRAY_SIZE(hwnds); ++i) -+ { -+ ret = SetWindowPos(hwnds[i], 0, orig.left, orig.top, 0, 0, -+ SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE); -+ ok(ret, "hwnd %u: failed to move window, error %u\n", i, GetLastError()); -+ } -+ -+ ret = ArrangeIconicWindows(parent); -+todo_wine -+ ok(ret == 1, "wrong ret %u\n", ret); -+ -+ GetWindowRect(hwnds[0], &rect); -+ SetRect(&expect, 0, 0, GetSystemMetrics(SM_CXMINIMIZED), GetSystemMetrics(SM_CYMINIMIZED)); -+ OffsetRect(&expect, mm.iHorzGap, mm.iVertGap); -+ OffsetRect(&expect, pt.x, pt.y); -+todo_wine -+ ok(EqualRect(&rect, &expect), "expected rect %s, got %s\n", -+ wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); -+ -+ for (i = 1; i < ARRAY_SIZE(hwnds); ++i) -+ { -+ GetWindowRect(hwnds[i], &rect); -+ expect = orig; -+ OffsetRect(&expect, pt.x, pt.y); -+ ok(EqualRect(&rect, &expect), "hwnd %u: expected rect %s, got %s\n", i, -+ wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); -+ } -+ -+ for (i = 0; i < ARRAY_SIZE(hwnds); ++i) -+ { -+ ShowWindow(hwnds[i], SW_MINIMIZE); -+ ret = SetWindowPos(hwnds[i], 0, orig.left, orig.top, 0, 0, -+ SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE); -+ ok(ret, "hwnd %u: failed to move window, error %u\n", i, GetLastError()); -+ } -+ -+ ret = ArrangeIconicWindows(parent); -+todo_wine -+ ok(ret == 10, "wrong ret %u\n", ret); -+ -+ col = mm.iHorzGap; -+ row = mm.iVertGap; -+ for (i = 0; i < ARRAY_SIZE(hwnds); ++i) -+ { -+ if (col + GetSystemMetrics(SM_CXMINIMIZED) > parent_rect.right - parent_rect.left) -+ { -+ col = mm.iHorzGap; -+ row += GetSystemMetrics(SM_CYMINIMIZED) + mm.iVertGap; -+ } -+ -+ GetWindowRect(hwnds[i], &rect); -+ SetRect(&expect, col, row, col + GetSystemMetrics(SM_CXMINIMIZED), -+ row + GetSystemMetrics(SM_CYMINIMIZED)); -+ OffsetRect(&expect, pt.x, pt.y); -+todo_wine -+ ok(EqualRect(&rect, &expect), "hwnd %u: expected rect %s, got %s\n", i, -+ wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); -+ -+ col += GetSystemMetrics(SM_CXMINIMIZED) + mm.iHorzGap; -+ } -+ -+ mm.iArrange = ARW_BOTTOMRIGHT | ARW_UP; -+ mm.iVertGap = 10; -+ ret = SystemParametersInfoA(SPI_SETMINIMIZEDMETRICS, sizeof(mm), &mm, 0); -+ ok(ret, "failed to set minimized metrics, error %u\n", GetLastError()); -+ -+ for (i = 0; i < ARRAY_SIZE(hwnds); ++i) -+ { -+ ret = SetWindowPos(hwnds[i], 0, orig.left, orig.top, 0, 0, -+ SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE); -+ ok(ret, "hwnd %u: failed to move window, error %u\n", i, GetLastError()); -+ } -+ -+ ret = ArrangeIconicWindows(parent); -+todo_wine -+ ok(ret == 10, "wrong ret %u\n", ret); -+ -+ col = parent_rect.right - mm.iHorzGap; -+ row = parent_rect.bottom - mm.iVertGap; -+ for (i = 0; i < ARRAY_SIZE(hwnds); ++i) -+ { -+ if (row - GetSystemMetrics(SM_CYMINIMIZED) < parent_rect.top) -+ { -+ row = parent_rect.bottom - mm.iVertGap; -+ col -= GetSystemMetrics(SM_CXMINIMIZED) + mm.iHorzGap; -+ } -+ -+ GetWindowRect(hwnds[i], &rect); -+ SetRect(&expect, col - GetSystemMetrics(SM_CXMINIMIZED), -+ row - GetSystemMetrics(SM_CYMINIMIZED), col, row); -+ OffsetRect(&expect, pt.x, pt.y); -+todo_wine -+ ok(EqualRect(&rect, &expect), "hwnd %u: expected rect %s, got %s\n", i, -+ wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect)); -+ -+ row -= GetSystemMetrics(SM_CYMINIMIZED) + mm.iVertGap; -+ } -+ -+ for (i = 0; i < ARRAY_SIZE(hwnds); ++i) -+ DestroyWindow(hwnds[i]); -+ -+ ret = SystemParametersInfoA(SPI_SETMINIMIZEDMETRICS, sizeof(oldmm), &oldmm, 0); -+ ok(ret, "failed to restore minimized metrics, error %u\n", GetLastError()); -+} -+ - START_TEST(win) - { - char **argv; -@@ -11463,6 +11623,7 @@ START_TEST(win) - test_destroy_quit(); - test_IsWindowEnabled(); - test_window_placement(); -+ test_arrange_iconic_windows(); - - /* add the tests above this line */ - if (hhook) UnhookWindowsHookEx(hhook); --- -2.19.2 - diff --git a/patches/windowscodecs-32bppPRGBA/0001-windowscodecs-Add-support-for-32bppRGB-32bppRGBA-and.patch b/patches/windowscodecs-32bppPRGBA/0001-windowscodecs-Add-support-for-32bppRGB-32bppRGBA-and.patch deleted file mode 100644 index f20e4b8b..00000000 --- a/patches/windowscodecs-32bppPRGBA/0001-windowscodecs-Add-support-for-32bppRGB-32bppRGBA-and.patch +++ /dev/null @@ -1,215 +0,0 @@ -From 19602d837ac30e24f629eeae62238eb9fbe4adcc Mon Sep 17 00:00:00 2001 -From: Dmitry Timoshkov -Date: Mon, 23 Jan 2017 18:24:46 +0800 -Subject: windowscodecs: Add support for 32bppRGB, 32bppRGBA and 32bppPRGBA to - format converter. - ---- - dlls/windowscodecs/converter.c | 74 ++++++++++++++++++++++++++++++++++++++++++ - dlls/windowscodecs/info.c | 2 ++ - dlls/windowscodecs/regsvr.c | 36 ++++++++++++++++++++ - 3 files changed, 112 insertions(+) - -diff --git a/dlls/windowscodecs/converter.c b/dlls/windowscodecs/converter.c -index 5561d423dce..519860d9065 100644 ---- a/dlls/windowscodecs/converter.c -+++ b/dlls/windowscodecs/converter.c -@@ -53,8 +53,11 @@ enum pixelformat { - format_24bppRGB, - format_32bppGrayFloat, - format_32bppBGR, -+ format_32bppRGB, - format_32bppBGRA, -+ format_32bppRGBA, - format_32bppPBGRA, -+ format_32bppPRGBA, - format_48bppRGB, - format_64bppRGBA, - format_32bppCMYK, -@@ -858,6 +861,25 @@ static HRESULT copypixels_to_32bppBGRA(struct FormatConverter *This, const WICRe - } - } - -+static HRESULT copypixels_to_32bppRGBA(struct FormatConverter *This, const WICRect *prc, -+ UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer, enum pixelformat source_format) -+{ -+ HRESULT hr; -+ -+ switch (source_format) -+ { -+ case format_32bppRGBA: -+ if (prc) -+ return IWICBitmapSource_CopyPixels(This->source, prc, cbStride, cbBufferSize, pbBuffer); -+ return S_OK; -+ default: -+ hr = copypixels_to_32bppBGRA(This, prc, cbStride, cbBufferSize, pbBuffer, source_format); -+ if (SUCCEEDED(hr) && prc) -+ reverse_bgr8(4, pbBuffer, prc->Width, prc->Height, cbStride); -+ return hr; -+ } -+} -+ - static HRESULT copypixels_to_32bppBGR(struct FormatConverter *This, const WICRect *prc, - UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer, enum pixelformat source_format) - { -@@ -874,6 +896,22 @@ static HRESULT copypixels_to_32bppBGR(struct FormatConverter *This, const WICRec - } - } - -+static HRESULT copypixels_to_32bppRGB(struct FormatConverter *This, const WICRect *prc, -+ UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer, enum pixelformat source_format) -+{ -+ switch (source_format) -+ { -+ case format_32bppRGB: -+ case format_32bppRGBA: -+ case format_32bppPRGBA: -+ if (prc) -+ return IWICBitmapSource_CopyPixels(This->source, prc, cbStride, cbBufferSize, pbBuffer); -+ return S_OK; -+ default: -+ return copypixels_to_32bppRGBA(This, prc, cbStride, cbBufferSize, pbBuffer, source_format); -+ } -+} -+ - static HRESULT copypixels_to_32bppPBGRA(struct FormatConverter *This, const WICRect *prc, - UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer, enum pixelformat source_format) - { -@@ -907,6 +945,39 @@ static HRESULT copypixels_to_32bppPBGRA(struct FormatConverter *This, const WICR - } - } - -+static HRESULT copypixels_to_32bppPRGBA(struct FormatConverter *This, const WICRect *prc, -+ UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer, enum pixelformat source_format) -+{ -+ HRESULT hr; -+ -+ switch (source_format) -+ { -+ case format_32bppPRGBA: -+ if (prc) -+ return IWICBitmapSource_CopyPixels(This->source, prc, cbStride, cbBufferSize, pbBuffer); -+ return S_OK; -+ default: -+ hr = copypixels_to_32bppRGBA(This, prc, cbStride, cbBufferSize, pbBuffer, source_format); -+ if (SUCCEEDED(hr) && prc) -+ { -+ INT x, y; -+ -+ for (y=0; yHeight; y++) -+ for (x=0; xWidth; x++) -+ { -+ BYTE alpha = pbBuffer[cbStride*y+4*x+3]; -+ if (alpha != 255) -+ { -+ pbBuffer[cbStride*y+4*x] = pbBuffer[cbStride*y+4*x] * alpha / 255; -+ pbBuffer[cbStride*y+4*x+1] = pbBuffer[cbStride*y+4*x+1] * alpha / 255; -+ pbBuffer[cbStride*y+4*x+2] = pbBuffer[cbStride*y+4*x+2] * alpha / 255; -+ } -+ } -+ } -+ return hr; -+ } -+} -+ - static HRESULT copypixels_to_24bppBGR(struct FormatConverter *This, const WICRect *prc, - UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer, enum pixelformat source_format) - { -@@ -1288,8 +1359,11 @@ static const struct pixelformatinfo supported_formats[] = { - {format_24bppRGB, &GUID_WICPixelFormat24bppRGB, copypixels_to_24bppRGB}, - {format_32bppGrayFloat, &GUID_WICPixelFormat32bppGrayFloat, copypixels_to_32bppGrayFloat}, - {format_32bppBGR, &GUID_WICPixelFormat32bppBGR, copypixels_to_32bppBGR}, -+ {format_32bppRGB, &GUID_WICPixelFormat32bppRGB, copypixels_to_32bppRGB}, - {format_32bppBGRA, &GUID_WICPixelFormat32bppBGRA, copypixels_to_32bppBGRA}, -+ {format_32bppRGBA, &GUID_WICPixelFormat32bppRGBA, copypixels_to_32bppRGBA}, - {format_32bppPBGRA, &GUID_WICPixelFormat32bppPBGRA, copypixels_to_32bppPBGRA}, -+ {format_32bppPRGBA, &GUID_WICPixelFormat32bppPRGBA, copypixels_to_32bppPRGBA}, - {format_48bppRGB, &GUID_WICPixelFormat48bppRGB, NULL}, - {format_64bppRGBA, &GUID_WICPixelFormat64bppRGBA, NULL}, - {format_32bppCMYK, &GUID_WICPixelFormat32bppCMYK, NULL}, -diff --git a/dlls/windowscodecs/info.c b/dlls/windowscodecs/info.c -index 5e6244b9ccd..cc0123d60c6 100644 ---- a/dlls/windowscodecs/info.c -+++ b/dlls/windowscodecs/info.c -@@ -2302,6 +2302,8 @@ HRESULT WINAPI WICConvertBitmapSource(REFWICPixelFormatGUID dstFormat, IWICBitma - BOOL canconvert; - ULONG num_fetched; - -+ TRACE("%s,%p,%p\n", debugstr_guid(dstFormat), pISrc, ppIDst); -+ - res = IWICBitmapSource_GetPixelFormat(pISrc, &srcFormat); - if (FAILED(res)) return res; - -diff --git a/dlls/windowscodecs/regsvr.c b/dlls/windowscodecs/regsvr.c -index b5bbff3b38f..308326cbdbc 100644 ---- a/dlls/windowscodecs/regsvr.c -+++ b/dlls/windowscodecs/regsvr.c -@@ -1480,8 +1480,11 @@ static GUID const * const converter_formats[] = { - &GUID_WICPixelFormat24bppBGR, - &GUID_WICPixelFormat24bppRGB, - &GUID_WICPixelFormat32bppBGR, -+ &GUID_WICPixelFormat32bppRGB, - &GUID_WICPixelFormat32bppBGRA, -+ &GUID_WICPixelFormat32bppRGBA, - &GUID_WICPixelFormat32bppPBGRA, -+ &GUID_WICPixelFormat32bppPRGBA, - &GUID_WICPixelFormat32bppGrayFloat, - &GUID_WICPixelFormat48bppRGB, - &GUID_WICPixelFormat64bppRGBA, -@@ -1945,6 +1948,17 @@ static struct regsvr_pixelformat const pixelformat_list[] = { - WICPixelFormatNumericRepresentationUnsignedInteger, - 0 - }, -+ { &GUID_WICPixelFormat32bppRGB, -+ "The Wine Project", -+ "32bpp RGB", -+ NULL, /* no version */ -+ &GUID_VendorMicrosoft, -+ 32, /* bitsperpixel */ -+ 3, /* channel count */ -+ channel_masks_8bit, -+ WICPixelFormatNumericRepresentationUnsignedInteger, -+ 0 -+ }, - { &GUID_WICPixelFormat32bppBGRA, - "The Wine Project", - "32bpp BGRA", -@@ -1956,6 +1970,17 @@ static struct regsvr_pixelformat const pixelformat_list[] = { - WICPixelFormatNumericRepresentationUnsignedInteger, - 1 - }, -+ { &GUID_WICPixelFormat32bppRGBA, -+ "The Wine Project", -+ "32bpp RGBA", -+ NULL, /* no version */ -+ &GUID_VendorMicrosoft, -+ 32, /* bitsperpixel */ -+ 4, /* channel count */ -+ channel_masks_8bit, -+ WICPixelFormatNumericRepresentationUnsignedInteger, -+ 1 -+ }, - { &GUID_WICPixelFormat32bppPBGRA, - "The Wine Project", - "32bpp PBGRA", -@@ -1967,6 +1992,17 @@ static struct regsvr_pixelformat const pixelformat_list[] = { - WICPixelFormatNumericRepresentationUnsignedInteger, - 1 - }, -+ { &GUID_WICPixelFormat32bppPRGBA, -+ "The Wine Project", -+ "32bpp PRGBA", -+ NULL, /* no version */ -+ &GUID_VendorMicrosoft, -+ 32, /* bitsperpixel */ -+ 4, /* channel count */ -+ channel_masks_8bit, -+ WICPixelFormatNumericRepresentationUnsignedInteger, -+ 1 -+ }, - { &GUID_WICPixelFormat32bppGrayFloat, - "The Wine Project", - "32bpp GrayFloat", --- -2.11.0 - diff --git a/patches/windowscodecs-32bppPRGBA/0002-windowscodecs-Fix-32bppRGB-to-32bppRGBA-conversion.patch b/patches/windowscodecs-32bppPRGBA/0002-windowscodecs-Fix-32bppRGB-to-32bppRGBA-conversion.patch deleted file mode 100644 index d464cfcb..00000000 --- a/patches/windowscodecs-32bppPRGBA/0002-windowscodecs-Fix-32bppRGB-to-32bppRGBA-conversion.patch +++ /dev/null @@ -1,111 +0,0 @@ -From ff6282f297e67822ee0def394a677a4fdc0fa609 Mon Sep 17 00:00:00 2001 -From: Dmitry Timoshkov -Date: Thu, 26 Jan 2017 19:01:21 +0800 -Subject: windowscodecs: Fix 32bppRGB to 32bppRGBA conversion. - ---- - dlls/windowscodecs/converter.c | 2 ++ - dlls/windowscodecs/tests/converter.c | 45 +++++++++++++++++++++++++++++++++++- - 2 files changed, 46 insertions(+), 1 deletion(-) - -diff --git a/dlls/windowscodecs/converter.c b/dlls/windowscodecs/converter.c -index 519860d9065..1378c85bc2d 100644 ---- a/dlls/windowscodecs/converter.c -+++ b/dlls/windowscodecs/converter.c -@@ -868,7 +868,9 @@ static HRESULT copypixels_to_32bppRGBA(struct FormatConverter *This, const WICRe - - switch (source_format) - { -+ case format_32bppRGB: - case format_32bppRGBA: -+ case format_32bppPRGBA: - if (prc) - return IWICBitmapSource_CopyPixels(This->source, prc, cbStride, cbBufferSize, pbBuffer); - return S_OK; -diff --git a/dlls/windowscodecs/tests/converter.c b/dlls/windowscodecs/tests/converter.c -index 1cafe90c734..17724d9ed01 100644 ---- a/dlls/windowscodecs/tests/converter.c -+++ b/dlls/windowscodecs/tests/converter.c -@@ -291,6 +291,21 @@ static BOOL compare_bits(const struct bitmap_data *expect, UINT buffersize, cons - if (!equal && expect->alt_data) - equal = compare_bits(expect->alt_data, buffersize, converted_bits); - -+ if (!equal && winetest_debug > 1) -+ { -+ UINT i, bps; -+ bps = expect->bpp / 8; -+ if (!bps) bps = buffersize; -+ printf("converted_bits (%u bytes):\n ", buffersize); -+ for (i = 0; i < buffersize; i++) -+ { -+ printf("%u,", converted_bits[i]); -+ if (!((i + 1) % 32)) printf("\n "); -+ else if (!((i+1) % bps)) printf(" "); -+ } -+ printf("\n"); -+ } -+ - return equal; - } - -@@ -438,6 +453,10 @@ static const BYTE bits_32bppBGR[] = { - 0,255,255,80, 255,0,255,80, 255,255,0,80, 255,255,255,80, 0,255,255,80, 255,0,255,80, 255,255,0,80, 255,255,255,80}; - static const struct bitmap_data testdata_32bppBGR = { - &GUID_WICPixelFormat32bppBGR, 32, bits_32bppBGR, 32, 2, 96.0, 96.0}; -+static const struct bitmap_data testdata_32bppBGRA80 = { -+ &GUID_WICPixelFormat32bppBGRA, 32, bits_32bppBGR, 32, 2, 96.0, 96.0}; -+static const struct bitmap_data testdata_32bppRGBA80 = { -+ &GUID_WICPixelFormat32bppRGBA, 32, bits_32bppBGR, 32, 2, 96.0, 96.0}; - - static const BYTE bits_32bppBGRA[] = { - 255,0,0,255, 0,255,0,255, 0,0,255,255, 0,0,0,255, 255,0,0,255, 0,255,0,255, 0,0,255,255, 0,0,0,255, -@@ -450,6 +469,24 @@ static const BYTE bits_32bppBGRA[] = { - 0,255,255,255, 255,0,255,255, 255,255,0,255, 255,255,255,255, 0,255,255,255, 255,0,255,255, 255,255,0,255, 255,255,255,255}; - static const struct bitmap_data testdata_32bppBGRA = { - &GUID_WICPixelFormat32bppBGRA, 32, bits_32bppBGRA, 32, 2, 96.0, 96.0}; -+static const struct bitmap_data testdata_32bppRGBA = { -+ &GUID_WICPixelFormat32bppRGBA, 32, bits_32bppBGRA, 32, 2, 96.0, 96.0}; -+static const struct bitmap_data testdata_32bppRGB = { -+ &GUID_WICPixelFormat32bppRGB, 32, bits_32bppBGRA, 32, 2, 96.0, 96.0}; -+ -+static const BYTE bits_32bppPBGRA[] = { -+ 80,0,0,80, 0,80,0,80, 0,0,80,80, 0,0,0,80, 80,0,0,80, 0,80,0,80, 0,0,80,80, 0,0,0,80, -+ 80,0,0,80, 0,80,0,80, 0,0,80,80, 0,0,0,80, 80,0,0,80, 0,80,0,80, 0,0,80,80, 0,0,0,80, -+ 80,0,0,80, 0,80,0,80, 0,0,80,80, 0,0,0,80, 80,0,0,80, 0,80,0,80, 0,0,80,80, 0,0,0,80, -+ 80,0,0,80, 0,80,0,80, 0,0,80,80, 0,0,0,80, 80,0,0,80, 0,80,0,80, 0,0,80,80, 0,0,0,80, -+ 0,80,80,80, 80,0,80,80, 80,80,0,80, 80,80,80,80, 0,80,80,80, 80,0,80,80, 80,80,0,80, 80,80,80,80, -+ 0,80,80,80, 80,0,80,80, 80,80,0,80, 80,80,80,80, 0,80,80,80, 80,0,80,80, 80,80,0,80, 80,80,80,80, -+ 0,80,80,80, 80,0,80,80, 80,80,0,80, 80,80,80,80, 0,80,80,80, 80,0,80,80, 80,80,0,80, 80,80,80,80, -+ 0,80,80,80, 80,0,80,80, 80,80,0,80, 80,80,80,80, 0,80,80,80, 80,0,80,80, 80,80,0,80, 80,80,80,80}; -+static const struct bitmap_data testdata_32bppPBGRA = { -+ &GUID_WICPixelFormat32bppPBGRA, 32, bits_32bppPBGRA, 32, 2, 96.0, 96.0}; -+static const struct bitmap_data testdata_32bppPRGBA = { -+ &GUID_WICPixelFormat32bppPRGBA, 32, bits_32bppPBGRA, 32, 2, 96.0, 96.0}; - - /* XP and 2003 use linear color conversion, later versions use sRGB gamma */ - static const float bits_32bppGrayFloat_xp[] = { -@@ -515,7 +552,7 @@ static void test_conversion(const struct bitmap_data *src, const struct bitmap_d - hr = WICConvertBitmapSource(dst->format, &src_obj->IWICBitmapSource_iface, &dst_bitmap); - todo_wine_if (todo) - ok(hr == S_OK || -- broken(hr == E_INVALIDARG) /* XP */, "WICConvertBitmapSource(%s) failed, hr=%x\n", name, hr); -+ broken(hr == E_INVALIDARG || hr == WINCODEC_ERR_COMPONENTNOTFOUND) /* XP */, "WICConvertBitmapSource(%s) failed, hr=%x\n", name, hr); - - if (hr == S_OK) - { -@@ -1752,6 +1789,12 @@ START_TEST(converter) - test_conversion(&testdata_32bppBGRA, &testdata_32bppBGR, "BGRA -> BGR", FALSE); - test_conversion(&testdata_32bppBGR, &testdata_32bppBGRA, "BGR -> BGRA", FALSE); - test_conversion(&testdata_32bppBGRA, &testdata_32bppBGRA, "BGRA -> BGRA", FALSE); -+ test_conversion(&testdata_32bppBGRA80, &testdata_32bppPBGRA, "BGRA -> PBGRA", FALSE); -+ -+ test_conversion(&testdata_32bppRGBA, &testdata_32bppRGB, "RGBA -> RGB", FALSE); -+ test_conversion(&testdata_32bppRGB, &testdata_32bppRGBA, "RGB -> RGBA", FALSE); -+ test_conversion(&testdata_32bppRGBA, &testdata_32bppRGBA, "RGBA -> RGBA", FALSE); -+ test_conversion(&testdata_32bppRGBA80, &testdata_32bppPRGBA, "RGBA -> PRGBA", FALSE); - - test_conversion(&testdata_24bppBGR, &testdata_24bppBGR, "24bppBGR -> 24bppBGR", FALSE); - test_conversion(&testdata_24bppBGR, &testdata_24bppRGB, "24bppBGR -> 24bppRGB", FALSE); --- -2.11.0 - diff --git a/patches/windowscodecs-32bppPRGBA/definition b/patches/windowscodecs-32bppPRGBA/definition deleted file mode 100644 index 3b3fe111..00000000 --- a/patches/windowscodecs-32bppPRGBA/definition +++ /dev/null @@ -1,2 +0,0 @@ -Fixes: Implement support for 32bppRGB, 32bppRGBA and 32bppPRGBA in format converter -Depends: windowscodecs-TIFF_Support