=?UTF-8?Q?Gabriel=20Iv=C4=83ncescu=20?=: comctl32/listbox: Use descr-> selected_item for single-selection listboxes when checking selection.

Alexandre Julliard julliard at winehq.org
Thu Feb 14 16:19:11 CST 2019


Module: wine
Branch: master
Commit: 1f062e386fa9e27812be56378380e76aefaf28b5
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=1f062e386fa9e27812be56378380e76aefaf28b5

Author: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Date:   Wed Feb 13 16:36:14 2019 +0200

comctl32/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/comctl32/listbox.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/comctl32/listbox.c b/dlls/comctl32/listbox.c
index 6ab224e..5c58214 100644
--- a/dlls/comctl32/listbox.c
+++ b/dlls/comctl32/listbox.c
@@ -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;
 }
 




More information about the wine-cvs mailing list