From 591ceb9982d7fb4c77082d69dce66fc0679409a9 Mon Sep 17 00:00:00 2001 From: DarkWyrm Date: Mon, 28 Jul 2003 17:34:20 +0000 Subject: [PATCH] Fleshed out a few undone functions - RebuildRegions, SetDriver, etc git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4118 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/server/RootLayer.cpp | 18 +++++++++--------- src/servers/app/server/RootLayer.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/servers/app/server/RootLayer.cpp b/src/servers/app/server/RootLayer.cpp index aebb34dfb4..29ae578d76 100644 --- a/src/servers/app/server/RootLayer.cpp +++ b/src/servers/app/server/RootLayer.cpp @@ -59,10 +59,8 @@ RootLayer::~RootLayer() */ void RootLayer::RequestDraw(const BRect &r) { - /* - 1) call the display driver's FillRect on the rectangle, filling with the layer's background color -2) recurse through each child and call its RequestDraw() function if it intersects the child's frame -*/ + Invalidate(r); + RequestDraw(); } /*! @@ -225,6 +223,7 @@ void RootLayer::ResizeBy(BPoint pt) */ void RootLayer::SetDriver(DisplayDriver *driver) { + _driver=driver; } /*! @@ -233,9 +232,10 @@ void RootLayer::SetDriver(DisplayDriver *driver) */ void RootLayer::RebuildRegions(bool recursive) { - /* - 1) get the frame -2) set full and visible regions to frame -3) iterate through each child and exclude its full region from the visible region if the child is visible. - */ + // Unlike the other layers, RootLayers can't depend on their parent layer to reset its + // visible region, so we have to do it itself. + _visible->MakeEmpty(); + _visible->Include(_full); + + Layer::RebuildRegions(recursive); } diff --git a/src/servers/app/server/RootLayer.h b/src/servers/app/server/RootLayer.h index 26e91e725e..0cd9b2db9d 100644 --- a/src/servers/app/server/RootLayer.h +++ b/src/servers/app/server/RootLayer.h @@ -57,7 +57,7 @@ public: private: DisplayDriver *_driver; RGBColor *_bgcolor; - bool _visible; + bool _isvisible; }; #endif