=?UTF-8?Q?Gabriel=20Iv=C4=83ncescu=20?=: user32/listbox: Use descr-> selected_item for single-selection listboxes when checking selection.
Alexandre Julliard
julliard at winehq.org
Fri Feb 15 14:37:01 CST 2019
Module: wine
Branch: master
Commit: 076fa5f3ed9423e10e8516792cbd8b9d41a8bbab
URL: https://source.winehq.org/git/wine.git/?a=commit;h=076fa5f3ed9423e10e8516792cbd8b9d41a8bbab
Author: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Date: Thu Feb 14 14:06:42 2019 +0200
user32/listbox: Use descr->selected_item for single-selection listboxes when checking selection.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/listbox.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/user32/listbox.c b/dlls/user32/listbox.c
index ac301c1..0e0399f 100644
--- a/dlls/user32/listbox.c
+++ b/dlls/user32/listbox.c
@@ -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;
}
More information about the wine-cvs
mailing list