From 826375885ff145c5e3f74d6231ecc17bc638a7ca Mon Sep 17 00:00:00 2001 From: Adi Oanca Date: Thu, 8 Jul 2004 19:15:57 +0000 Subject: [PATCH] Umm, decorator was fully redrawn if another window went over it. This should happen in resizing only. Fixed that now. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8356 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/server/Layer.cpp | 13 +++++++++++-- src/servers/app/server/Layer.h | 11 ++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/servers/app/server/Layer.cpp b/src/servers/app/server/Layer.cpp index 0453e7e8ef..fa6215bc99 100644 --- a/src/servers/app/server/Layer.cpp +++ b/src/servers/app/server/Layer.cpp @@ -65,6 +65,7 @@ Layer::Layer(BRect frame, const char *name, int32 token, uint32 resize, fFlags = flags; fAdFlags = 0; fClassID = AS_LAYER_CLASS; + fFrameAction = B_LAYER_NONE; fResizeMode = resize; fHidden = false; @@ -456,7 +457,7 @@ void Layer::RequestDraw(const BRegion ®, Layer *startFrom) // calculate the minimum region/rectangle to be updated with // a single message to the client. fUpdateReg = fFullVisible; - if (fFlags & B_FULL_UPDATE_ON_RESIZE){ } + if (fFlags & B_FULL_UPDATE_ON_RESIZE && fFrameAction == B_LAYER_RESIZE){ } else { fUpdateReg.IntersectWith(®); } if (fUpdateReg.CountRects() > 0) @@ -486,7 +487,7 @@ void Layer::RequestDraw(const BRegion ®, Layer *startFrom) else { fUpdateReg = fVisible; - if (fFlags & B_FULL_UPDATE_ON_RESIZE){ } + if (fFlags & B_FULL_UPDATE_ON_RESIZE && fFrameAction == B_LAYER_RESIZE){ } else { fUpdateReg.IntersectWith(®); } if (fUpdateReg.CountRects() > 0) @@ -1015,6 +1016,8 @@ void Layer::MoveBy(float x, float y) return; } + fFrameAction = B_LAYER_MOVE; + BPoint pt(x,y); BRect rect(fFull.Frame().OffsetByCopy(pt)); @@ -1024,6 +1027,8 @@ void Layer::MoveBy(float x, float y) EmptyGlobals(); + fFrameAction = B_LAYER_NONE; + STRACE(("Layer(%s)::MoveBy() END\n", GetName())); } @@ -1116,6 +1121,8 @@ void Layer::ResizeBy(float x, float y) return; } + fFrameAction = B_LAYER_RESIZE; + BPoint pt(x,y); BRect rect(fFull.Frame()); rect.right += x; @@ -1127,6 +1134,8 @@ void Layer::ResizeBy(float x, float y) fParent->Redraw(gRedrawReg, this); EmptyGlobals(); + + fFrameAction = B_LAYER_NONE; STRACE(("Layer(%s)::ResizeBy() END\n", GetName())); } diff --git a/src/servers/app/server/Layer.h b/src/servers/app/server/Layer.h index 2d7ca57330..95d354b136 100644 --- a/src/servers/app/server/Layer.h +++ b/src/servers/app/server/Layer.h @@ -12,11 +12,11 @@ enum { - B_LAYER_NONE = 0x00001000UL, - B_LAYER_MOVE = 0x00002000UL, - B_LAYER_SIMPLE_MOVE = 0x00004000UL, - B_LAYER_RESIZE = 0x00008000UL, - B_LAYER_MASK_RESIZE = 0x00010000UL, + B_LAYER_NONE = 0x1U, + B_LAYER_MOVE = 0x2U, + B_LAYER_SIMPLE_MOVE = 0x3U, + B_LAYER_RESIZE = 0x4U, + B_LAYER_MASK_RESIZE = 0x5U, }; enum @@ -157,6 +157,7 @@ protected: bool fIsTopLayer; uint16 fAdFlags; int8 fClassID; + bool fFrameAction; DisplayDriver *fDriver; LayerData *fLayerData;