From a8eca598cea4f758ba0b97bd55cc9deb5c6a8e9f Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Mon, 4 Sep 2017 01:45:03 +0200 Subject: [PATCH] Added patch to revert listbox popup height changes. --- patches/patchinstall.sh | 19 +++++ ...mbo-Set-listbox-popup-height-correct.patch | 74 +++++++++++++++++++ .../user32-Revert_ListBox_Height/definition | 1 + 3 files changed, 94 insertions(+) create mode 100644 patches/user32-Revert_ListBox_Height/0001-Revert-user32-combo-Set-listbox-popup-height-correct.patch create mode 100644 patches/user32-Revert_ListBox_Height/definition diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 5fc6c0ec..fc8f6c13 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -401,6 +401,7 @@ patch_enable_all () enable_user32_Mouse_Message_Hwnd="$1" enable_user32_PNG_Support="$1" enable_user32_Refresh_MDI_Menus="$1" + enable_user32_Revert_ListBox_Height="$1" enable_user32_ScrollWindowEx="$1" enable_user32_ShowWindow="$1" enable_user32_Sorted_Listbox="$1" @@ -1479,6 +1480,9 @@ patch_enable () user32-Refresh_MDI_Menus) enable_user32_Refresh_MDI_Menus="$2" ;; + user32-Revert_ListBox_Height) + enable_user32_Revert_ListBox_Height="$2" + ;; user32-ScrollWindowEx) enable_user32_ScrollWindowEx="$2" ;; @@ -8739,6 +8743,21 @@ if test "$enable_user32_Refresh_MDI_Menus" -eq 1; then ) >> "$patchlist" fi +# Patchset user32-Revert_ListBox_Height +# | +# | This patchset fixes the following Wine bugs: +# | * [#43643] Revert patch to fix listbox popup height +# | +# | Modified files: +# | * dlls/user32/combo.c, dlls/user32/tests/combo.c +# | +if test "$enable_user32_Revert_ListBox_Height" -eq 1; then + patch_apply user32-Revert_ListBox_Height/0001-Revert-user32-combo-Set-listbox-popup-height-correct.patch + ( + printf '%s\n' '+ { "Sebastian Lackner", "Revert \"user32/combo: Set listbox popup height correctly and add tests.\".", 1 },'; + ) >> "$patchlist" +fi + # Patchset user32-ScrollWindowEx # | # | This patchset fixes the following Wine bugs: diff --git a/patches/user32-Revert_ListBox_Height/0001-Revert-user32-combo-Set-listbox-popup-height-correct.patch b/patches/user32-Revert_ListBox_Height/0001-Revert-user32-combo-Set-listbox-popup-height-correct.patch new file mode 100644 index 00000000..5bbb7c85 --- /dev/null +++ b/patches/user32-Revert_ListBox_Height/0001-Revert-user32-combo-Set-listbox-popup-height-correct.patch @@ -0,0 +1,74 @@ +From 58357b49f12f724bb9e2444f7cb193e3d2983ce2 Mon Sep 17 00:00:00 2001 +From: Sebastian Lackner +Date: Mon, 4 Sep 2017 01:35:03 +0200 +Subject: Revert "user32/combo: Set listbox popup height correctly and add + tests." + +This reverts commit f7f7b89e2e9117811c91269643868c6d063db5e9. +--- + dlls/user32/combo.c | 8 ++++++++ + dlls/user32/tests/combo.c | 20 ++++++++++---------- + 2 files changed, 18 insertions(+), 10 deletions(-) + +diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c +index 79103160cfa..501bfe80b7e 100644 +--- a/dlls/user32/combo.c ++++ b/dlls/user32/combo.c +@@ -1033,6 +1033,14 @@ static void CBDropDown( LPHEADCOMBO lphc ) + + if (nHeight < nDroppedHeight - COMBO_YBORDERSIZE()) + nDroppedHeight = nHeight + COMBO_YBORDERSIZE(); ++ ++ if (nDroppedHeight < nHeight) ++ { ++ if (nItems < 5) ++ nDroppedHeight = (nItems+1)*nIHeight; ++ else if (nDroppedHeight < 6*nIHeight) ++ nDroppedHeight = 6*nIHeight; ++ } + } + + r.left = rect.left; +diff --git a/dlls/user32/tests/combo.c b/dlls/user32/tests/combo.c +index 03fc412e418..1a67611905e 100644 +--- a/dlls/user32/tests/combo.c ++++ b/dlls/user32/tests/combo.c +@@ -718,25 +718,25 @@ static void test_listbox_size(DWORD style) + int height_combo; + BOOL todo; + } info_height[] = { +- {2, 24}, ++ {2, 24, TRUE}, + {2, 41, TRUE}, +- {2, 42}, +- {2, 50}, ++ {2, 42, TRUE}, ++ {2, 50, TRUE}, + {2, 60}, + {2, 80}, + {2, 89}, + {2, 90}, + {2, 100}, + +- {10, 24}, ++ {10, 24, TRUE}, + {10, 41, TRUE}, +- {10, 42}, +- {10, 50}, +- {10, 60}, +- {10, 80}, ++ {10, 42, TRUE}, ++ {10, 50, TRUE}, ++ {10, 60, TRUE}, ++ {10, 80, TRUE}, + {10, 89, TRUE}, +- {10, 90}, +- {10, 100}, ++ {10, 90, TRUE}, ++ {10, 100, TRUE}, + }; + + pGetComboBoxInfo = (void *)GetProcAddress(GetModuleHandleA("user32.dll"), "GetComboBoxInfo"); +-- +2.14.1 + diff --git a/patches/user32-Revert_ListBox_Height/definition b/patches/user32-Revert_ListBox_Height/definition new file mode 100644 index 00000000..adf10781 --- /dev/null +++ b/patches/user32-Revert_ListBox_Height/definition @@ -0,0 +1 @@ +Fixes: [43643] Revert patch to fix listbox popup height