From 1c6c29e313810168358c5cb1a164b92adc266f29 Mon Sep 17 00:00:00 2001 From: "Dimitrie O. Paun" Date: Thu, 10 Oct 2002 22:57:45 +0000 Subject: [PATCH] Fix drawing bug introduced with the custom notification reorganization. --- dlls/comctl32/listview.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index f573b8d83c2..0941be2318d 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -682,6 +682,7 @@ static void customdraw_fill(NMLVCUSTOMDRAW *lpnmlvcd, LISTVIEW_INFO *infoPtr, HD !((infoPtr->dwStyle & LVS_TYPEMASK) == LVS_REPORT && (infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT)) ) isSelected = FALSE; + if (isSelected && infoPtr->bFocus) { lpnmlvcd->clrTextBk = comctl32_color.clrHighlight; @@ -3122,8 +3123,9 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, DWORD rcSelect = rcLabel; if ((infoPtr->dwStyle & LVS_TYPEMASK) == LVS_REPORT && (infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT)) rcSelect.right = rcBox.right; - - ExtTextOutW(hdc, rcSelect.left, rcSelect.top, ETO_OPAQUE, &rcSelect, 0, 0, 0); + + if (lvItem.state & LVIS_SELECTED) + ExtTextOutW(hdc, rcSelect.left, rcSelect.top, ETO_OPAQUE, &rcSelect, 0, 0, 0); if(lprcFocus) *lprcFocus = rcSelect; DrawTextW(hdc, lvItem.pszText, -1, &rcLabel, LV_SL_DT_FLAGS | DT_CENTER);