Piotr Caban : comctl32: Don't update rebar layout if it doesn' t change in REBAR_HandleUDDrag.

Alexandre Julliard julliard at winehq.org
Thu Nov 1 14:42:58 CDT 2012


Module: wine
Branch: master
Commit: d2f4893cb697f9c1b2b390c9ce12a443d843f04b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d2f4893cb697f9c1b2b390c9ce12a443d843f04b

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Thu Nov  1 15:27:57 2012 +0100

comctl32: Don't update rebar layout if it doesn't change in REBAR_HandleUDDrag.

---

 dlls/comctl32/rebar.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c
index 02d9064..105363c 100644
--- a/dlls/comctl32/rebar.c
+++ b/dlls/comctl32/rebar.c
@@ -2136,6 +2136,8 @@ REBAR_HandleUDDrag (REBAR_INFO *infoPtr, const POINT *ptsmove)
     if(yOff < 0)
     {
         /* Place the band above the current top row */
+        if(iHitBand==0 && (infoPtr->uNumBands==1 || REBAR_GetBand(infoPtr, 1)->fStyle&RBBS_BREAK))
+            return;
         DPA_DeletePtr(infoPtr->bands, iHitBand);
         hitBand->fStyle &= RBBS_BREAK;
         REBAR_GetBand(infoPtr, 0)->fStyle |= RBBS_BREAK;
@@ -2145,6 +2147,8 @@ REBAR_HandleUDDrag (REBAR_INFO *infoPtr, const POINT *ptsmove)
     else if(yOff > REBAR_GetBand(infoPtr, infoPtr->uNumBands - 1)->rcBand.bottom)
     {
         /* Place the band below the current bottom row */
+        if(iHitBand == infoPtr->uNumBands-1 && hitBand->fStyle&RBBS_BREAK)
+            return;
         DPA_DeletePtr(infoPtr->bands, iHitBand);
         hitBand->fStyle |= RBBS_BREAK;
         infoPtr->iGrabbedBand = DPA_InsertPtr(




More information about the wine-cvs mailing list