Nikolay Sivov : comctl32/listview: Don't hittest when it's not needed.
Alexandre Julliard
julliard at winehq.org
Mon May 25 10:06:33 CDT 2009
Module: wine
Branch: master
Commit: 0920079b69b4ba33b84a8b88ded0738517576b0f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0920079b69b4ba33b84a8b88ded0738517576b0f
Author: Nikolay Sivov <bunglehead at gmail.com>
Date: Mon May 25 00:44:26 2009 +0400
comctl32/listview: Don't hittest when it's not needed.
---
dlls/comctl32/listview.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index d1dc2ee..14f73d0 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -3401,8 +3401,6 @@ static LRESULT LISTVIEW_MouseMove(LISTVIEW_INFO *infoPtr, WORD fwKeys, INT x, IN
if (!PtInRect(&rect, tmp))
{
- NMLISTVIEW nmlv;
-
/* this path covers the following:
1. WM_LBUTTONDOWN over selected item (sets focus on it)
2. change focus with keys
@@ -3419,15 +3417,17 @@ static LRESULT LISTVIEW_MouseMove(LISTVIEW_INFO *infoPtr, WORD fwKeys, INT x, IN
infoPtr->nLButtonDownItem = -1;
}
- lvHitTestInfo.pt = infoPtr->ptClickPos;
- LISTVIEW_HitTest(infoPtr, &lvHitTestInfo, TRUE, TRUE);
-
- ZeroMemory(&nmlv, sizeof(nmlv));
- nmlv.iItem = lvHitTestInfo.iItem;
- nmlv.ptAction = infoPtr->ptClickPos;
-
if (!infoPtr->bDragging)
{
+ NMLISTVIEW nmlv;
+
+ lvHitTestInfo.pt = infoPtr->ptClickPos;
+ LISTVIEW_HitTest(infoPtr, &lvHitTestInfo, TRUE, TRUE);
+
+ ZeroMemory(&nmlv, sizeof(nmlv));
+ nmlv.iItem = lvHitTestInfo.iItem;
+ nmlv.ptAction = infoPtr->ptClickPos;
+
notify_listview(infoPtr, LVN_BEGINDRAG, &nmlv);
infoPtr->bDragging = TRUE;
}
More information about the wine-cvs
mailing list