From 53284d2a18e49d9fea9e6db47378918498155e30 Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Sun, 9 Jan 2011 09:40:15 +0000 Subject: [PATCH] comctl32/rebar: Moved drag notify code into REBAR_MouseMove. --- dlls/comctl32/rebar.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c index 5ab55d46336..65496380312 100644 --- a/dlls/comctl32/rebar.c +++ b/dlls/comctl32/rebar.c @@ -2044,20 +2044,6 @@ REBAR_HandleLRDrag (REBAR_INFO *infoPtr, const POINT *ptsmove) INT movement, xBand, cxLeft = 0; BOOL shrunkBands = FALSE; - /* on first significant mouse movement, issue notify */ - if (!(infoPtr->fStatus & BEGIN_DRAG_ISSUED)) { - if (REBAR_Notify_NMREBAR (infoPtr, -1, RBN_BEGINDRAG)) { - /* Notify returned TRUE - abort drag */ - infoPtr->dragStart.x = 0; - infoPtr->dragStart.y = 0; - infoPtr->dragNow = infoPtr->dragStart; - infoPtr->iGrabbedBand = -1; - ReleaseCapture (); - return ; - } - infoPtr->fStatus |= BEGIN_DRAG_ISSUED; - } - iHitBand = infoPtr->iGrabbedBand; iRowBegin = get_row_begin_for_band(infoPtr, iHitBand); iRowEnd = get_row_end_for_band(infoPtr, iHitBand); @@ -3095,6 +3081,20 @@ REBAR_MouseMove (REBAR_INFO *infoPtr, LPARAM lParam) if ((abs(ptMove.x - infoPtr->dragNow.x) <= mindragx) && (abs(ptMove.y - infoPtr->dragNow.y) <= mindragy)) return 0; + /* on first significant mouse movement, issue notify */ + if (!(infoPtr->fStatus & BEGIN_DRAG_ISSUED)) { + if (REBAR_Notify_NMREBAR (infoPtr, -1, RBN_BEGINDRAG)) { + /* Notify returned TRUE - abort drag */ + infoPtr->dragStart.x = 0; + infoPtr->dragStart.y = 0; + infoPtr->dragNow = infoPtr->dragStart; + infoPtr->iGrabbedBand = -1; + ReleaseCapture (); + return 0; + } + infoPtr->fStatus |= BEGIN_DRAG_ISSUED; + } + /* Test for valid drag case - must not be first band in row */ if ((yPtMove < band->rcBand.top) || (yPtMove > band->rcBand.bottom)) {