Lei Zhang : comctl32: Get rid of DragDetect.
Alexandre Julliard
julliard at winehq.org
Wed Oct 29 09:39:32 CDT 2008
Module: wine
Branch: master
Commit: 9b057494d082094162ac796cbc7f059d9b21e9ec
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9b057494d082094162ac796cbc7f059d9b21e9ec
Author: Lei Zhang <thestig at google.com>
Date: Wed Oct 29 01:57:54 2008 -0700
comctl32: Get rid of DragDetect.
---
dlls/comctl32/listview.c | 22 +++++++++++++---------
1 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 55fb848..d218a5c 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -3326,16 +3326,20 @@ static LRESULT LISTVIEW_MouseMove(LISTVIEW_INFO *infoPtr, WORD fwKeys, INT x, IN
if (infoPtr->bLButtonDown)
{
- MSG msg;
- BOOL skip = FALSE;
- /* Check to see if we got a WM_LBUTTONUP, and skip the DragDetect.
- * Otherwise, DragDetect will eat it.
- */
- if (PeekMessageW(&msg, 0, WM_MOUSEFIRST, WM_MOUSELAST, PM_NOREMOVE))
- if (msg.message == WM_LBUTTONUP)
- skip = TRUE;
+ POINT tmp;
+ RECT rect;
+ WORD wDragWidth = GetSystemMetrics(SM_CXDRAG);
+ WORD wDragHeight= GetSystemMetrics(SM_CYDRAG);
+
+ rect.left = infoPtr->ptClickPos.x - wDragWidth;
+ rect.right = infoPtr->ptClickPos.x + wDragWidth;
+ 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;
NMLISTVIEW nmlv;
More information about the wine-cvs
mailing list