diff --git a/src/servers/app/Layer.cpp b/src/servers/app/Layer.cpp index d3fa87dd78..138e3433e3 100644 --- a/src/servers/app/Layer.cpp +++ b/src/servers/app/Layer.cpp @@ -29,7 +29,6 @@ #include "ServerApp.h" #include "ServerProtocol.h" #include "ServerWindow.h" -#include "WindowLayer.h" #include "Layer.h" #include "ServerBitmap.h" @@ -1437,13 +1436,8 @@ Layer::_GetAllRebuildDirty(BRegion *totalReg) void -Layer::_AllRedraw(const BRegion &invalid) +Layer::_AllRedraw(const BRegion& invalid) { - // couldn't find a simpler way to send _UPDATE_ message to client. - WindowLayer *windowLayer = dynamic_cast(this); - if (windowLayer) - windowLayer->RequestClientRedraw(invalid); - if (fVisible.CountRects() > 0) { BRegion updateReg(fVisible); updateReg.IntersectWith(&invalid); diff --git a/src/servers/app/Layer.h b/src/servers/app/Layer.h index ec97ee8a30..bab4c9445a 100644 --- a/src/servers/app/Layer.h +++ b/src/servers/app/Layer.h @@ -205,8 +205,8 @@ class Layer { void TriggerRebuild(); void _GetAllRebuildDirty(BRegion *totalReg); - virtual void Draw(const BRect& r); - void _AllRedraw(const BRegion &invalid); + virtual void Draw(const BRect& updateRect); + virtual void _AllRedraw(const BRegion& invalid); protected: friend class RootLayer; @@ -240,7 +240,7 @@ class Layer { DrawingEngine* fDriver; RootLayer* fRootLayer; ServerWindow* fWindow; - WindowLayer* fOwner; + WindowLayer* fOwner; DrawState* fDrawState; diff --git a/src/servers/app/WindowLayer.cpp b/src/servers/app/WindowLayer.cpp index c5dc991746..3f1832e8aa 100644 --- a/src/servers/app/WindowLayer.cpp +++ b/src/servers/app/WindowLayer.cpp @@ -824,6 +824,16 @@ WindowLayer::RequestClientRedraw(const BRegion &invalid) } +void +WindowLayer::_AllRedraw(const BRegion &invalid) +{ + // send _UPDATE_ message to client + RequestClientRedraw(invalid); + + Layer::_AllRedraw(invalid); +} + + void WindowLayer::SetTopLayer(Layer* layer) { diff --git a/src/servers/app/WindowLayer.h b/src/servers/app/WindowLayer.h index 92a8b3b55a..1c1ad0f2d1 100644 --- a/src/servers/app/WindowLayer.h +++ b/src/servers/app/WindowLayer.h @@ -113,15 +113,16 @@ class WindowLayer : public Layer { float TabLocation() const; void HighlightDecorator(bool active); - + inline void QuietlySetWorkspaces(uint32 wks) { fWorkspaces = wks; } void QuietlySetFeel(int32 feel); SubWindowList fSubWindowList; - void RequestClientRedraw(const BRegion &invalid); + void RequestClientRedraw(const BRegion& invalid); + virtual void _AllRedraw(const BRegion& invalid); - virtual void SetTopLayer(Layer* layer); + void SetTopLayer(Layer* layer); inline Layer* TopLayer() const { return fTopLayer; }