From d6cc738728d3ed31b938c2c2ac02e56ea826c0a0 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sun, 14 Feb 2016 06:22:28 +0100 Subject: [PATCH] Added patch to preserve beginning of extra data for MDI windows. --- patches/patchinstall.sh | 19 +++++++ ...beginning-of-extra-data-for-MDI-wind.patch | 57 +++++++++++++++++++ patches/user32-MDI_Extra_Data/definition | 1 + 3 files changed, 77 insertions(+) create mode 100644 patches/user32-MDI_Extra_Data/0001-user32-Preserve-beginning-of-extra-data-for-MDI-wind.patch create mode 100644 patches/user32-MDI_Extra_Data/definition diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 0fd065f4..e79f4864 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -311,6 +311,7 @@ patch_enable_all () enable_user32_GetSystemMetrics="$1" enable_user32_Invalidate_Key_State="$1" enable_user32_ListBox_Size="$1" + enable_user32_MDI_Extra_Data="$1" enable_user32_Mouse_Message_Hwnd="$1" enable_user32_Refresh_MDI_Menus="$1" enable_user32_ScrollWindowEx="$1" @@ -1079,6 +1080,9 @@ patch_enable () user32-ListBox_Size) enable_user32_ListBox_Size="$2" ;; + user32-MDI_Extra_Data) + enable_user32_MDI_Extra_Data="$2" + ;; user32-Mouse_Message_Hwnd) enable_user32_Mouse_Message_Hwnd="$2" ;; @@ -6322,6 +6326,21 @@ if test "$enable_user32_ListBox_Size" -eq 1; then ) >> "$patchlist" fi +# Patchset user32-MDI_Extra_Data +# | +# | This patchset fixes the following Wine bugs: +# | * [#15473] Preserve beginning of extra data for MDI windows +# | +# | Modified files: +# | * dlls/user32/mdi.c, dlls/user32/tests/msg.c +# | +if test "$enable_user32_MDI_Extra_Data" -eq 1; then + patch_apply user32-MDI_Extra_Data/0001-user32-Preserve-beginning-of-extra-data-for-MDI-wind.patch + ( + echo '+ { "Michael Müller", "user32: Preserve beginning of extra data for MDI windows.", 1 },'; + ) >> "$patchlist" +fi + # Patchset user32-Mouse_Message_Hwnd # | # | This patchset fixes the following Wine bugs: diff --git a/patches/user32-MDI_Extra_Data/0001-user32-Preserve-beginning-of-extra-data-for-MDI-wind.patch b/patches/user32-MDI_Extra_Data/0001-user32-Preserve-beginning-of-extra-data-for-MDI-wind.patch new file mode 100644 index 00000000..86fc5dcd --- /dev/null +++ b/patches/user32-MDI_Extra_Data/0001-user32-Preserve-beginning-of-extra-data-for-MDI-wind.patch @@ -0,0 +1,57 @@ +From fe8f3aa132c6fed2d663a95f9f5c8d3626a6693a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michael=20M=C3=BCller?= +Date: Sun, 14 Feb 2016 04:49:46 +0100 +Subject: user32: Preserve beginning of extra data for MDI windows. + +--- + dlls/user32/mdi.c | 1 + + dlls/user32/tests/msg.c | 6 +++++- + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/dlls/user32/mdi.c b/dlls/user32/mdi.c +index b5a0473..62023a7 100644 +--- a/dlls/user32/mdi.c ++++ b/dlls/user32/mdi.c +@@ -127,6 +127,7 @@ typedef struct + * states it must keep coherency with USER32 on its own. This is true for + * Windows as well. + */ ++ LRESULT reserved; + UINT nActiveChildren; + HWND hwndChildMaximized; + HWND hwndActiveChild; +diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c +index d15a8e7..eeb887b 100644 +--- a/dlls/user32/tests/msg.c ++++ b/dlls/user32/tests/msg.c +@@ -3380,6 +3380,7 @@ static void test_mdi_messages(void) + BOOL zoomed; + RECT rc; + HMENU hMenu = CreateMenu(); ++ DWORD val; + + if (!mdi_RegisterWindowClasses()) assert(0); + +@@ -3408,8 +3409,9 @@ static void test_mdi_messages(void) + rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, + mdi_frame, 0, GetModuleHandleA(0), &client_cs); + assert(mdi_client); +- ok_sequence(WmCreateMDIclientSeq, "Create visible MDI client window", FALSE); ++ SetWindowLongA(mdi_client, 0, 0xdeadbeef); + ++ ok_sequence(WmCreateMDIclientSeq, "Create visible MDI client window", FALSE); + ok(GetActiveWindow() == mdi_frame, "wrong active window %p\n", GetActiveWindow()); + ok(GetFocus() == mdi_frame, "input focus should be on MDI frame not on %p\n", GetFocus()); + +@@ -3867,6 +3869,8 @@ static void test_mdi_messages(void) + SetFocus(0); + flush_sequence(); + ++ val = GetWindowLongA(mdi_client, 0); ++ ok(val == 0xdeadbeef || broken(val == 0) /* >= Win 2003 */, "Expected 0xdeadbeef, got 0x%x\n", val); + DestroyWindow(mdi_client); + ok_sequence(WmDestroyMDIclientSeq, "Destroy MDI client window", FALSE); + +-- +2.7.1 + diff --git a/patches/user32-MDI_Extra_Data/definition b/patches/user32-MDI_Extra_Data/definition new file mode 100644 index 00000000..64d66e1e --- /dev/null +++ b/patches/user32-MDI_Extra_Data/definition @@ -0,0 +1 @@ +Fixes: [15473] Preserve beginning of extra data for MDI windows