comctl32: Set listview focus on WM_LBUTTONUP instead of WM_LBUTTONDOWN.

This commit is contained in:
Lei Zhang 2008-08-18 16:05:27 -07:00 committed by Alexandre Julliard
parent 44941a55fa
commit 098dc7b330
1 changed files with 3 additions and 3 deletions

View File

@ -8588,10 +8588,7 @@ static LRESULT LISTVIEW_LButtonDown(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, IN
if (!notify(infoPtr, NM_RELEASEDCAPTURE)) return 0;
if (!infoPtr->bFocus)
{
bReceivedFocus = TRUE;
SetFocus(infoPtr->hwndSelf);
}
/* set left button down flag and record the click position */
infoPtr->bLButtonDown = TRUE;
@ -8721,6 +8718,9 @@ static LRESULT LISTVIEW_LButtonUp(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, INT
LISTVIEW_DelayedEditItem);
}
if (!infoPtr->bFocus)
SetFocus(infoPtr->hwndSelf);
return 0;
}