[2/2] comctl32: Don't update the status if the item is no longer valid.

Akihiro Sagawa sagawa.aki at gmail.com
Wed Jan 20 07:34:40 CST 2016


On Tue, 19 Jan 2016 18:43:13 +0300, Nikolay Sivov wrote:
> I think this is correct, but to make sure I fully understand what's
> going on. The idea is to return early from _SetItemT() for the case when
> old focused item index is larger than current number items in a list?
> From reading surrounding code, it looks like application will receive
> state notifications for item number that's no longer valid, am I right?
That's right. _SetItemT(), called from _SetItemState(), refuses updating
if nItem is out of range by checking infoPtr->nItemCount. 

> > +    /* The focused item isn't updated after the invalidation */
> 
> The opposite is true, focused item is updated in this new test, from 0
> to -1 (nothing focused), please fix this comment to reflect that.
Sure.

> > comctl32: Don't update the status if the item is no longer valid.
> 
> Subject needs some adjusting to, something like "Prevent invalid focuse
> change notifications from LVS_OWNERDATA lists", or similar. Right now
> it's not clear what 'status' and 'item' mean in this context.
OK, I'm going to use your sentence as the subject in try 2 patch.

Thanks for reviewing,
Akihiro Sagawa




More information about the wine-devel mailing list