Commit 5631d063 authored by Dimi Paun's avatar Dimi Paun Committed by Alexandre Julliard

Do not compute the hit test if we don't really need it.

parent 6560c48e
...@@ -3186,27 +3186,22 @@ static LRESULT LISTVIEW_MouseHover(LISTVIEW_INFO *infoPtr, WORD fwKyes, INT x, I ...@@ -3186,27 +3186,22 @@ static LRESULT LISTVIEW_MouseHover(LISTVIEW_INFO *infoPtr, WORD fwKyes, INT x, I
static LRESULT LISTVIEW_MouseMove(LISTVIEW_INFO *infoPtr, WORD fwKeys, INT x, INT y) static LRESULT LISTVIEW_MouseMove(LISTVIEW_INFO *infoPtr, WORD fwKeys, INT x, INT y)
{ {
TRACKMOUSEEVENT trackinfo; TRACKMOUSEEVENT trackinfo;
LVHITTESTINFO lvHitTestInfo;
INT nItem;
if (infoPtr->bLButtonDown) if (infoPtr->bLButtonDown && DragDetect(infoPtr->hwndSelf, infoPtr->ptClickPos))
{ {
lvHitTestInfo.pt = infoPtr->ptClickPos; LVHITTESTINFO lvHitTestInfo;
nItem = LISTVIEW_HitTest(infoPtr, &lvHitTestInfo, TRUE, TRUE); NMLISTVIEW nmlv;
if (DragDetect(infoPtr->hwndSelf, infoPtr->ptClickPos)) lvHitTestInfo.pt = infoPtr->ptClickPos;
{ LISTVIEW_HitTest(infoPtr, &lvHitTestInfo, TRUE, TRUE);
NMLISTVIEW nmlv;
ZeroMemory(&nmlv, sizeof(nmlv)); ZeroMemory(&nmlv, sizeof(nmlv));
nmlv.iItem = nItem; nmlv.iItem = lvHitTestInfo.iItem;
nmlv.ptAction.x = infoPtr->ptClickPos.x; nmlv.ptAction = infoPtr->ptClickPos;
nmlv.ptAction.y = infoPtr->ptClickPos.y;
notify_listview(infoPtr, LVN_BEGINDRAG, &nmlv); notify_listview(infoPtr, LVN_BEGINDRAG, &nmlv);
return 0; return 0;
}
} }
/* see if we are supposed to be tracking mouse hovering */ /* see if we are supposed to be tracking mouse hovering */
......
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