comctl32: Set listview focus in WM_LBUTTONDOWN.

This patch reverts commit 098dc7b330 and
moves focus setting after LVN_ITEMCHANGED notification is sent. Writing
tests for it is tricky because native blocks inside WM_LBUTTONDOWN message.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2015-12-01 19:12:41 +01:00 committed by Alexandre Julliard
parent a4fb95d7b5
commit ddcab8acea
1 changed files with 3 additions and 3 deletions

View File

@ -10266,6 +10266,9 @@ static LRESULT LISTVIEW_LButtonDown(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, IN
}
}
if (!infoPtr->bFocus)
SetFocus(infoPtr->hwndSelf);
if (infoPtr->dwLvExStyle & LVS_EX_ONECLICKACTIVATE)
if(lvHitTestInfo.iItem != -1) notify_itemactivate(infoPtr,&lvHitTestInfo);
}
@ -10352,9 +10355,6 @@ static LRESULT LISTVIEW_LButtonUp(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, INT
LISTVIEW_DelayedEditItem);
}
if (!infoPtr->bFocus)
SetFocus(infoPtr->hwndSelf);
return 0;
}