Index: listview.c =================================================================== RCS file: /home/wine/wine/dlls/comctl32/listview.c,v retrieving revision 1.492 diff -u -r1.492 listview.c --- listview.c 7 Dec 2007 19:20:16 -0000 1.492 +++ listview.c 11 Dec 2007 06:38:32 -0000 @@ -944,7 +944,7 @@ return result; } -static void prepaint_setup (const LISTVIEW_INFO *infoPtr, HDC hdc, NMLVCUSTOMDRAW *lpnmlvcd) +static void prepaint_setup (const LISTVIEW_INFO *infoPtr, HDC hdc, NMLVCUSTOMDRAW *lpnmlvcd, BOOL SubItem) { if (lpnmlvcd->clrTextBk == CLR_DEFAULT) lpnmlvcd->clrTextBk = comctl32_color.clrWindow; @@ -952,18 +952,21 @@ lpnmlvcd->clrText = comctl32_color.clrWindowText; /* apprently, for selected items, we have to override the returned values */ - if (lpnmlvcd->nmcd.uItemState & CDIS_SELECTED) + if (!SubItem) { - if (infoPtr->bFocus) - { - lpnmlvcd->clrTextBk = comctl32_color.clrHighlight; - lpnmlvcd->clrText = comctl32_color.clrHighlightText; + if (lpnmlvcd->nmcd.uItemState & CDIS_SELECTED) + { + if (infoPtr->bFocus) + { + lpnmlvcd->clrTextBk = comctl32_color.clrHighlight; + lpnmlvcd->clrText = comctl32_color.clrHighlightText; + } + else if (infoPtr->dwStyle & LVS_SHOWSELALWAYS) + { + lpnmlvcd->clrTextBk = comctl32_color.clr3dFace; + lpnmlvcd->clrText = comctl32_color.clrBtnText; + } } - else if (infoPtr->dwStyle & LVS_SHOWSELALWAYS) - { - lpnmlvcd->clrTextBk = comctl32_color.clr3dFace; - lpnmlvcd->clrText = comctl32_color.clrBtnText; - } } /* Set the text attributes */ @@ -3787,7 +3790,9 @@ if (cdsubitemmode & CDRF_SKIPDEFAULT) goto postpaint; } if (nSubItem == 0 || (cdmode & CDRF_NOTIFYITEMDRAW)) - prepaint_setup(infoPtr, hdc, &nmlvcd); + prepaint_setup(infoPtr, hdc, &nmlvcd, FALSE); + else if ((infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT) == FALSE) + prepaint_setup(infoPtr, hdc, &nmlvcd, TRUE); /* in full row select, subitems, will just use main item's colors */ if (nSubItem && uView == LVS_REPORT && (infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT)) @@ -3930,7 +3935,7 @@ if (!(cditemmode & CDRF_SKIPDEFAULT)) { - prepaint_setup (infoPtr, hdc, &nmlvcd); + prepaint_setup (infoPtr, hdc, &nmlvcd, FALSE); SendMessageW(infoPtr->hwndNotify, WM_DRAWITEM, dis.CtlID, (LPARAM)&dis); } @@ -4118,7 +4123,7 @@ customdraw_fill(&nmlvcd, infoPtr, hdc, &rcClient, 0); cdmode = notify_customdraw(infoPtr, CDDS_PREPAINT, &nmlvcd); if (cdmode & CDRF_SKIPDEFAULT) goto enddraw; - prepaint_setup(infoPtr, hdc, &nmlvcd); + prepaint_setup(infoPtr, hdc, &nmlvcd, FALSE); /* Use these colors to draw the items */ infoPtr->clrTextBk = nmlvcd.clrTextBk;