X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3568f700f6e80adcfc707cddfdcc303a2dd8a7c2..2e98aa124386e26c78ca725430c0b0c692db9fc2:/src/msw/listctrl.cpp diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 1102ccc5e3..3516a38973 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -2483,7 +2483,8 @@ static void HandleItemPaint(LPNMLVCUSTOMDRAW pLVCD, HFONT hfont) } // same thing for CDIS_FOCUS (except simpler as there is only one of them) - if ( ListView_GetNextItem(hwndList, -1, LVNI_FOCUSED) == item ) + if ( ::GetFocus() == hwndList && + ListView_GetNextItem(hwndList, -1, LVNI_FOCUSED) == item ) { nmcd.uItemState |= CDIS_FOCUS; }