[PATCH v6 2/7] comctl32/listbox: Use a helper to expand the item array
Nikolay Sivov
nsivov at codeweavers.com
Tue Dec 4 04:08:23 CST 2018
I did some testing on Windows, and LB_INITSTORAGE is not supposed to
work the way it's implemented right now, before or after your patch.
Summary of what I found:
- LB_INITSTORAGE should return current capacity, 'items_size' in our
case, not LB_OKAY;
- it's not additive, and calling it for 0 count does not increase
returned value, policy is items_size = max(items_size, wParam + 10);
- it never shrinks as far as I can tell from return value, items_size is
reset to 0 only on LB_RESETCONTENT, same for LB_DELETESTRING;
- array grows by 32 items, not 16;
- there is no alignment when growing on insert, so LB_RESETCONTENT ->
LB_INITSTORAGE(1) -> LB_ADDSTRING twice -> items_size is 33.
Currently we have no tests for this message.
More information about the wine-devel
mailing list