Module: wine Branch: master Commit: ddcab8aceada5ee7df8bbd3d9c04de4ce5a25725 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ddcab8aceada5ee7df8bbd3d9c...
Author: Piotr Caban piotr@codeweavers.com Date: Tue Dec 1 19:12:41 2015 +0100
comctl32: Set listview focus in WM_LBUTTONDOWN.
This patch reverts commit 098dc7b3302f39c5500d644615a6f4c37d328ce0 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
---
dlls/comctl32/listview.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index e479dca..68a5515 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -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; }