[PATCH 2/2] user32/listbox: Optimize SetCount partly
Huw Davies
huw at codeweavers.com
Wed Sep 19 08:53:54 CDT 2018
> On 19 Sep 2018, at 12:46, Gabriel Ivăncescu <gabrielopcode at gmail.com> wrote:
>
> On Wed, Sep 19, 2018 at 1:55 PM, Huw Davies <huw at codeweavers.com> wrote:
>>
>> I'm also concerned that we won't get WM_MEASUREITEMs in the
>> LBS_OWNERDRAWVARIABLE case.
>>
>> Huw.
>
> I don't know if that's an issue since SetCount should theoretically be
> an "instant" operation and these items are just added at the end as
> empty. I think Windows doesn't even support SetCount without
> LBS_NODATA (which is not supported by Wine yet, I think I'll try
> working on it and implement it in an optimal way, i.e. with the
> minimum amount of memory needed, since it's meant for very very large
> lists).
>
> But, at least for now, I can fall back to the original (unoptimal)
> behavior if OWNERDRAWVARIABLE is set, would that be acceptable?
I think implementing LBS_NODATA should come before adding LB_SETCOUNT
code that will need to be changed again. Also, adding a test to
show that LB_SETCOUNT fails if the style is LBS_OWNERDRAWFIXED, for
example, wouldn't hurt.
Huw.
More information about the wine-devel
mailing list