diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c index c43d726205c..0e64e85464f 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 0519ace51c7..72e8777d207 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");