listbox: selecting items
Lauri Tulmin
lauri_ at ut.ee
Thu Nov 11 17:17:39 CST 2004
currently clicking on an item in a listbox with LBS_EXTENDEDSEL style
won't select that item. that's because LISTBOX_HandleLButtonDown calls
LISTBOX_MoveCaret that will select the item and also calls
LISTBOX_SetSelection that will deselect the selcted item. this patch
shouldn't change the behaviour of listboxes without LBS_EXTENDEDSEL style.
changelog
- make clicking on a listbox with LBS_EXTENDEDSEL style select an item
-------------- next part --------------
Index: listbox.c
===================================================================
RCS file: /home/wine/wine/dlls/user/listbox.c,v
retrieving revision 1.5
diff -u -r1.5 listbox.c
--- listbox.c 26 Oct 2004 22:03:00 -0000 1.5
+++ listbox.c 11 Nov 2004 21:55:29 -0000
@@ -2015,11 +2015,10 @@
{
LISTBOX_MoveCaret( descr, index, FALSE );
- if (descr->style & LBS_MULTIPLESEL)
+ if (!(descr->style & LBS_EXTENDEDSEL))
{
LISTBOX_SetSelection( descr, index,
- (!(descr->style & LBS_MULTIPLESEL) ||
- !descr->items[index].selected),
+ !descr->items[index].selected,
(descr->style & LBS_NOTIFY) != 0 );
}
}
More information about the wine-patches
mailing list