Sebastian Lackner : Revert "user32/combo: Set listbox popup height correctly and add tests.".

Alexandre Julliard julliard at winehq.org
Mon Dec 11 13:53:37 CST 2017


Module: wine
Branch: master
Commit: f0fc0349976924379cc3ae2ff95fb342d7541294
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f0fc0349976924379cc3ae2ff95fb342d7541294

Author: Sebastian Lackner <sebastian at fds-team.de>
Date:   Sun Dec 10 21:36:46 2017 +0000

Revert "user32/combo: Set listbox popup height correctly and add tests.".

This partly reverts commit f7f7b89e2e9117811c91269643868c6d063db5e9
(tests are left in place).

Any application that currently uses "Microsoft.Windows.Common-Controls
v6" via a Manifest has the possibility of breaking comboboxes. Using
this version of the control ensures that dropdown for comboboxes, will
show multiple items, regardless of its height in the resource.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 c43d726..0e64e85 100644
--- a/dlls/user32/combo.c
+++ b/dlls/user32/combo.c
@@ -1044,6 +1044,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 0519ace..72e8777 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");




More information about the wine-cvs mailing list