user32/listbox: Use descr->selected_item for single-selection listboxes when checking selection.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Gabriel Ivăncescu 2019-02-14 14:06:42 +02:00 committed by Alexandre Julliard
parent 087304f117
commit 076fa5f3ed

View file

@ -150,6 +150,8 @@ static BOOL resize_storage(LB_DESCR *descr, UINT items_size)
static BOOL is_item_selected( const LB_DESCR *descr, UINT index )
{
if (!(descr->style & (LBS_MULTIPLESEL | LBS_EXTENDEDSEL)))
return index == descr->selected_item;
return descr->items[index].selected;
}