listview: getsubitemrect fix

Huw D M Davies h.davies1 at physics.ox.ac.uk
Tue Nov 4 06:50:23 CST 2003


        Huw Davies <huw at codeweavers.com>
	LISTVIEW_GetSubItemRect should succeed if subitem == 0 whatever mode
	the listview is in.
-- 
Huw Davies
huw at codeweavers.com

Index: dlls/comctl32/listview.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/listview.c,v
retrieving revision 1.371
diff -u -r1.371 listview.c
--- dlls/comctl32/listview.c	4 Nov 2003 04:22:37 -0000	1.371
+++ dlls/comctl32/listview.c	4 Nov 2003 12:47:27 -0000
@@ -5410,16 +5410,18 @@
     POINT Position;
     LVITEMW lvItem;
     
-    if (!lprc || (infoPtr->dwStyle & LVS_TYPEMASK) != LVS_REPORT) return FALSE;
-    
+    if (!lprc) return FALSE;
+
     TRACE("(nItem=%d, nSubItem=%ld)\n", nItem, lprc->top);
     /* On WinNT, a subitem of '0' calls LISTVIEW_GetItemRect */
     if (lprc->top == 0)
         return LISTVIEW_GetItemRect(infoPtr, nItem, lprc);
 
+    if ((infoPtr->dwStyle & LVS_TYPEMASK) != LVS_REPORT) return FALSE;
+
     if (!LISTVIEW_GetItemPosition(infoPtr, nItem, &Position)) return FALSE;
 
-    lvItem.mask = lprc->top == 0 ? LVIF_INDENT : 0;
+    lvItem.mask = 0;
     lvItem.iItem = nItem;
     lvItem.iSubItem = lprc->top;
     



More information about the wine-patches mailing list