user32: Add more listbox message tests, make them pass under Wine

Alexandre Julliard julliard at winehq.org
Tue Oct 16 07:58:05 CDT 2007


Dmitry Timoshkov <dmitry at codeweavers.com> writes:

> @@ -533,8 +538,11 @@ static INT LISTBOX_GetItemFromPoint( LB_DESCR *descr, INT x, INT y )
>  static void LISTBOX_PaintItem( LB_DESCR *descr, HDC hdc, const RECT *rect, 
>  			       INT index, UINT action, BOOL ignoreFocus )
>  {
> -    LB_ITEMDATA *item = NULL;
> -    if (index < descr->nb_items) item = &descr->items[index];
> +    LB_ITEMDATA *item;
> +
> +    if (index >= descr->nb_items) return;
> +    
> +    item = &descr->items[index];

This will break the painting of a focus rect for an empy listbox. We
are supposed to show a focus rect on the first item when the listbox
has focus, even if there are no items.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list