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,28 +3186,23 @@ 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)
{
TRACKMOUSEEVENT trackinfo;
LVHITTESTINFO lvHitTestInfo;
INT nItem;
if (infoPtr->bLButtonDown)
{
lvHitTestInfo.pt = infoPtr->ptClickPos;
nItem = LISTVIEW_HitTest(infoPtr, &lvHitTestInfo, TRUE, TRUE);
if (DragDetect(infoPtr->hwndSelf, infoPtr->ptClickPos))
if (infoPtr->bLButtonDown && DragDetect(infoPtr->hwndSelf, infoPtr->ptClickPos))
{
LVHITTESTINFO lvHitTestInfo;
NMLISTVIEW nmlv;
lvHitTestInfo.pt = infoPtr->ptClickPos;
LISTVIEW_HitTest(infoPtr, &lvHitTestInfo, TRUE, TRUE);
ZeroMemory(&nmlv, sizeof(nmlv));
nmlv.iItem = nItem;
nmlv.ptAction.x = infoPtr->ptClickPos.x;
nmlv.ptAction.y = infoPtr->ptClickPos.y;
nmlv.iItem = lvHitTestInfo.iItem;
nmlv.ptAction = infoPtr->ptClickPos;
notify_listview(infoPtr, LVN_BEGINDRAG, &nmlv);
return 0;
}
}
/* see if we are supposed to be tracking mouse hovering */
if(infoPtr->dwLvExStyle & LVS_EX_TRACKSELECT) {
......
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