Made Layer::_AllRedraw() virtual so that it doesn't need this ugly hack to
send _UPDATE_ messages (WindowLayer now overrides that method). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15129 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -29,7 +29,6 @@
|
|||||||
#include "ServerApp.h"
|
#include "ServerApp.h"
|
||||||
#include "ServerProtocol.h"
|
#include "ServerProtocol.h"
|
||||||
#include "ServerWindow.h"
|
#include "ServerWindow.h"
|
||||||
#include "WindowLayer.h"
|
|
||||||
#include "Layer.h"
|
#include "Layer.h"
|
||||||
#include "ServerBitmap.h"
|
#include "ServerBitmap.h"
|
||||||
|
|
||||||
@@ -1437,13 +1436,8 @@ Layer::_GetAllRebuildDirty(BRegion *totalReg)
|
|||||||
|
|
||||||
|
|
||||||
void
|
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<WindowLayer*>(this);
|
|
||||||
if (windowLayer)
|
|
||||||
windowLayer->RequestClientRedraw(invalid);
|
|
||||||
|
|
||||||
if (fVisible.CountRects() > 0) {
|
if (fVisible.CountRects() > 0) {
|
||||||
BRegion updateReg(fVisible);
|
BRegion updateReg(fVisible);
|
||||||
updateReg.IntersectWith(&invalid);
|
updateReg.IntersectWith(&invalid);
|
||||||
|
|||||||
@@ -205,8 +205,8 @@ class Layer {
|
|||||||
void TriggerRebuild();
|
void TriggerRebuild();
|
||||||
void _GetAllRebuildDirty(BRegion *totalReg);
|
void _GetAllRebuildDirty(BRegion *totalReg);
|
||||||
|
|
||||||
virtual void Draw(const BRect& r);
|
virtual void Draw(const BRect& updateRect);
|
||||||
void _AllRedraw(const BRegion &invalid);
|
virtual void _AllRedraw(const BRegion& invalid);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
friend class RootLayer;
|
friend class RootLayer;
|
||||||
@@ -240,7 +240,7 @@ class Layer {
|
|||||||
DrawingEngine* fDriver;
|
DrawingEngine* fDriver;
|
||||||
RootLayer* fRootLayer;
|
RootLayer* fRootLayer;
|
||||||
ServerWindow* fWindow;
|
ServerWindow* fWindow;
|
||||||
WindowLayer* fOwner;
|
WindowLayer* fOwner;
|
||||||
|
|
||||||
DrawState* fDrawState;
|
DrawState* fDrawState;
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
void
|
||||||
WindowLayer::SetTopLayer(Layer* layer)
|
WindowLayer::SetTopLayer(Layer* layer)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -113,15 +113,16 @@ class WindowLayer : public Layer {
|
|||||||
float TabLocation() const;
|
float TabLocation() const;
|
||||||
|
|
||||||
void HighlightDecorator(bool active);
|
void HighlightDecorator(bool active);
|
||||||
|
|
||||||
inline void QuietlySetWorkspaces(uint32 wks) { fWorkspaces = wks; }
|
inline void QuietlySetWorkspaces(uint32 wks) { fWorkspaces = wks; }
|
||||||
void QuietlySetFeel(int32 feel);
|
void QuietlySetFeel(int32 feel);
|
||||||
|
|
||||||
SubWindowList fSubWindowList;
|
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
|
inline Layer* TopLayer() const
|
||||||
{ return fTopLayer; }
|
{ return fTopLayer; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user