diff --git a/src/servers/app/decorator/DecorManager.h b/src/servers/app/decorator/DecorManager.h index 5240b01bce..d5826c22f2 100644 --- a/src/servers/app/decorator/DecorManager.h +++ b/src/servers/app/decorator/DecorManager.h @@ -52,7 +52,7 @@ public: virtual const DesktopListenerList& GetDesktopListeners(); protected: - virtual Decorator* _AllocateDecorator(DesktopSettings& settings, + virtual Decorator* _AllocateDecorator(DesktopSettings& settings, BRect rect); DesktopListenerList fDesktopListeners; diff --git a/src/servers/app/decorator/Decorator.cpp b/src/servers/app/decorator/Decorator.cpp index 1bd90bb4b2..49eacc25cf 100644 --- a/src/servers/app/decorator/Decorator.cpp +++ b/src/servers/app/decorator/Decorator.cpp @@ -294,7 +294,8 @@ Decorator::TabRect(Decorator::Tab* tab) const Note that this does not update the button's look - it just updates the internal button value - \param is_down Whether the button is down or not + \param tab The tab index + \param pressed Whether the button is down or not */ void Decorator::SetClose(int32 tab, bool pressed) @@ -309,6 +310,7 @@ Decorator::SetClose(int32 tab, bool pressed) } } + /*! \brief Sets the minimize button's value. Note that this does not update the button's look - it just updates the @@ -619,17 +621,17 @@ Decorator::GetSettings(BMessage* settings) const } -/*! \brief Updates the decorator's look in the area \a rect +/*! \brief Updates the decorator in the rectangular area \a updateRect. The default version updates all areas which intersect the frame and tab. - \param rect The area to update. + \param updateRect The rectangular area to update. */ void -Decorator::Draw(BRect rect) +Decorator::Draw(BRect updateRect) { - _DrawFrame(rect & fFrame); - _DrawTabs(rect & fTitleBarRect); + _DrawFrame(updateRect & fFrame); + _DrawTabs(updateRect & fTitleBarRect); } @@ -748,7 +750,6 @@ Decorator::_DrawFrame(BRect rect) } - void Decorator::_DrawTabs(BRect rect) { diff --git a/src/servers/app/decorator/Decorator.h b/src/servers/app/decorator/Decorator.h index 40c740da9b..20df2f4b89 100644 --- a/src/servers/app/decorator/Decorator.h +++ b/src/servers/app/decorator/Decorator.h @@ -155,7 +155,7 @@ public: BRegion* updateRegion = NULL); virtual bool GetSettings(BMessage* settings) const; - virtual void Draw(BRect rect); + virtual void Draw(BRect updateRect); virtual void Draw(); virtual void DrawClose(int32 tab); virtual void DrawMinimize(int32 tab); diff --git a/src/servers/app/decorator/DefaultDecorator.cpp b/src/servers/app/decorator/DefaultDecorator.cpp index 4e1b245724..974fa5c688 100644 --- a/src/servers/app/decorator/DefaultDecorator.cpp +++ b/src/servers/app/decorator/DefaultDecorator.cpp @@ -721,8 +721,7 @@ DefaultDecorator::_DrawFrame(BRect invalid) fDrawingEngine->StrokeLine(BPoint(r.left + i, r.top + i), BPoint(r.right - i, r.top + i), colors[i * 2]); } - if (fTitleBarRect.IsValid() - && fTopTab->look != kLeftTitledWindowLook) { + if (fTitleBarRect.IsValid() && fTopTab->look != kLeftTitledWindowLook) { // grey along the bottom of the tab // (overwrites "white" from frame) fDrawingEngine->StrokeLine( @@ -1436,7 +1435,7 @@ DefaultDecorator::_GetFootprint(BRegion *region) // This function calculates the decorator's footprint in coordinates // relative to the view. This is most often used to set a Window // object's visible region. - if (!region) + if (region == NULL) return; region->MakeEmpty(); diff --git a/src/servers/app/decorator/DefaultDecorator.h b/src/servers/app/decorator/DefaultDecorator.h index 7f46309007..16bc52f6e7 100644 --- a/src/servers/app/decorator/DefaultDecorator.h +++ b/src/servers/app/decorator/DefaultDecorator.h @@ -141,7 +141,7 @@ protected: virtual bool _SetSettings(const BMessage& settings, BRegion* updateRegion = NULL); - virtual bool _AddTab(DesktopSettings& settings, + virtual bool _AddTab(DesktopSettings& settings, int32 index = -1, BRegion* updateRegion = NULL); virtual bool _RemoveTab(int32 index,