comctl32/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-13 16:36:14 +02:00 committed by Alexandre Julliard
parent 012b7669f7
commit 1f062e386f

View file

@ -155,6 +155,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;
}