listbox: make previosly submitted tests pass

Lauri Tulmin lauri_ at ut.ee
Sat Dec 25 10:13:49 CST 2004


Make tests i sent a few days ago 
(http://www.winehq.org/hypermail/wine-patches/2004/12/0487.html) pass in 
wine.
-------------- next part --------------
Index: dlls/user/listbox.c
===================================================================
RCS file: /home/wine/wine/dlls/user/listbox.c,v
retrieving revision 1.7
diff -u -p -r1.7 listbox.c
--- dlls/user/listbox.c	20 Dec 2004 19:02:40 -0000	1.7
+++ dlls/user/listbox.c	23 Dec 2004 14:29:17 -0000
@@ -2010,11 +2010,16 @@ static LRESULT LISTBOX_HandleLButtonDown
         {
             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 );
+            }
+            else
+            {
+                LISTBOX_SetSelection( descr, index,
+                               !descr->items[index].selected,
                               (descr->style & LBS_NOTIFY) != 0 );
             }
         }


More information about the wine-patches mailing list