Two small fixes for ListView focus handling. - ListView should handle EN_KILLFOCUS WM_COMMAND message. It currently does not. - When sorting a list, we need to invalidate the focus rectangle. Currently, if the sorting causes the focused item to go out of the visible window area, the focus rectangle will be drawn incorrectly at its old place. -- // Sami Nopanen - sam@pcuf.fi / snopanen@cc.hut.fi
Index: listview.c =================================================================== RCS file: /home/wine/wine/dlls/comctl32/listview.c,v retrieving revision 1.356 diff -u -r1.356 listview.c --- listview.c 9 Jul 2003 02:52:58 -0000 1.356 +++ listview.c 13 Jul 2003 20:56:41 -0000 @@ -7087,6 +7087,10 @@ if (uView != LVS_ICON && uView != LVS_SMALLICON) LISTVIEW_InvalidateList(infoPtr); + /* invalidate focus rectangle */ + if (infoPtr->bFocus) + SetRectEmpty(&infoPtr->rcFocus); + return TRUE; } @@ -9027,6 +9031,12 @@ ReleaseDC(infoPtr->hwndSelf, hdc); break; + } + + case EN_KILLFOCUS: + { + LISTVIEW_KillFocus(infoPtr); + break; } default: