[PATCH v2 1/2] user32/combo: Properly set dropdown height

Fabian Maurer dark.shadow4 at web.de
Sun Aug 19 14:03:54 CDT 2018


Now that user32 and comctl32 combo are separated,
this won't lead to a regression anymore.

Signed-off-by: Fabian Maurer <dark.shadow4 at web.de>
---
 dlls/user32/combo.c       |  8 --------
 dlls/user32/tests/combo.c | 20 ++++++++++----------
 2 files changed, 10 insertions(+), 18 deletions(-)

diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c
index dcfa661f97..31ec6af526 100644
--- a/dlls/user32/combo.c
+++ b/dlls/user32/combo.c
@@ -1029,14 +1029,6 @@ 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 3358e846a0..0d3b1b170f 100644
--- a/dlls/user32/tests/combo.c
+++ b/dlls/user32/tests/combo.c
@@ -688,25 +688,25 @@ static void test_listbox_size(DWORD style)
         int height_combo;
         BOOL todo;
     } info_height[] = {
-        {2, 24, TRUE},
+        {2, 24, FALSE},
         {2, 41, TRUE},
-        {2, 42, TRUE},
-        {2, 50, TRUE},
+        {2, 42, FALSE},
+        {2, 50, FALSE},
         {2, 60},
         {2, 80},
         {2, 89},
         {2, 90},
         {2, 100},
 
-        {10, 24, TRUE},
+        {10, 24, FALSE},
         {10, 41, TRUE},
-        {10, 42, TRUE},
-        {10, 50, TRUE},
-        {10, 60, TRUE},
-        {10, 80, TRUE},
+        {10, 42, FALSE},
+        {10, 50, FALSE},
+        {10, 60, FALSE},
+        {10, 80, FALSE},
         {10, 89, TRUE},
-        {10, 90, TRUE},
-        {10, 100, TRUE},
+        {10, 90, FALSE},
+        {10, 100, FALSE},
     };
 
     for(test = 0; test < ARRAY_SIZE(info_height); test++)
-- 
2.18.0




More information about the wine-devel mailing list