Commit 098dc7b3 authored by Lei Zhang's avatar Lei Zhang Committed by Alexandre Julliard

comctl32: Set listview focus on WM_LBUTTONUP instead of WM_LBUTTONDOWN.

parent 44941a55
...@@ -8588,10 +8588,7 @@ static LRESULT LISTVIEW_LButtonDown(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, IN ...@@ -8588,10 +8588,7 @@ static LRESULT LISTVIEW_LButtonDown(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, IN
if (!notify(infoPtr, NM_RELEASEDCAPTURE)) return 0; if (!notify(infoPtr, NM_RELEASEDCAPTURE)) return 0;
if (!infoPtr->bFocus) if (!infoPtr->bFocus)
{
bReceivedFocus = TRUE; bReceivedFocus = TRUE;
SetFocus(infoPtr->hwndSelf);
}
/* set left button down flag and record the click position */ /* set left button down flag and record the click position */
infoPtr->bLButtonDown = TRUE; infoPtr->bLButtonDown = TRUE;
...@@ -8721,6 +8718,9 @@ static LRESULT LISTVIEW_LButtonUp(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, INT ...@@ -8721,6 +8718,9 @@ static LRESULT LISTVIEW_LButtonUp(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, INT
LISTVIEW_DelayedEditItem); LISTVIEW_DelayedEditItem);
} }
if (!infoPtr->bFocus)
SetFocus(infoPtr->hwndSelf);
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment