Commit 9b057494 authored by Lei Zhang's avatar Lei Zhang Committed by Alexandre Julliard

comctl32: Get rid of DragDetect.

parent 929dcfaa
...@@ -3326,16 +3326,20 @@ static LRESULT LISTVIEW_MouseMove(LISTVIEW_INFO *infoPtr, WORD fwKeys, INT x, IN ...@@ -3326,16 +3326,20 @@ static LRESULT LISTVIEW_MouseMove(LISTVIEW_INFO *infoPtr, WORD fwKeys, INT x, IN
if (infoPtr->bLButtonDown) if (infoPtr->bLButtonDown)
{ {
MSG msg; POINT tmp;
BOOL skip = FALSE; RECT rect;
/* Check to see if we got a WM_LBUTTONUP, and skip the DragDetect. WORD wDragWidth = GetSystemMetrics(SM_CXDRAG);
* Otherwise, DragDetect will eat it. WORD wDragHeight= GetSystemMetrics(SM_CYDRAG);
*/
if (PeekMessageW(&msg, 0, WM_MOUSEFIRST, WM_MOUSELAST, PM_NOREMOVE)) rect.left = infoPtr->ptClickPos.x - wDragWidth;
if (msg.message == WM_LBUTTONUP) rect.right = infoPtr->ptClickPos.x + wDragWidth;
skip = TRUE; rect.top = infoPtr->ptClickPos.y - wDragHeight;
rect.bottom = infoPtr->ptClickPos.y + wDragHeight;
tmp.x = x;
tmp.y = y;
if (!skip && DragDetect(infoPtr->hwndSelf, infoPtr->ptClickPos)) if (!PtInRect(&rect, tmp))
{ {
LVHITTESTINFO lvHitTestInfo; LVHITTESTINFO lvHitTestInfo;
NMLISTVIEW nmlv; NMLISTVIEW nmlv;
......
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