diff --git a/src/servers/app/View.cpp b/src/servers/app/View.cpp index 554308d475..8964810b19 100644 --- a/src/servers/app/View.cpp +++ b/src/servers/app/View.cpp @@ -720,8 +720,10 @@ View::ResizeBy(int32 x, int32 y, BRegion* dirtyRegion) // include their own dirty regions in ParentResized() for (View* child = FirstChild(); child; child = child->NextSibling()) { - if (!child->IsVisible()) + if (!child->IsVisible() + || child->fViewColor == B_TRANSPARENT_COLOR) { continue; + } IntRect previousChildVisible( child->Frame() & oldBounds & Bounds()); if (dirty->Frame().Intersects(previousChildVisible)) { @@ -925,6 +927,22 @@ View::CopyBits(IntRect src, IntRect dst, BRegion& windowContentClipping) // #pragma mark - +void +View::SetViewColor(const rgb_color& color) +{ + rgb_color oldColor = fViewColor; + fViewColor = color; + // Child view with B_TRANSPARENT_COLOR view color change clipping of + // parent view. + if (fParent != NULL + && IsVisible() + && ((oldColor == B_TRANSPARENT_COLOR) + != (color == B_TRANSPARENT_COLOR))) { + fParent->RebuildClipping(false); + } +} + + void View::ColorUpdated(color_which which, rgb_color color) { @@ -1406,8 +1424,10 @@ View::RebuildClipping(bool deep) return; for (; child; child = child->NextSibling()) { - if (child->IsVisible()) + if (child->IsVisible() + && child->fViewColor != B_TRANSPARENT_COLOR) { childrenRegion->Include((clipping_rect)child->Frame()); + } } fLocalClipping.Exclude(childrenRegion); diff --git a/src/servers/app/View.h b/src/servers/app/View.h index 84e2b3cf16..7c82cfee64 100644 --- a/src/servers/app/View.h +++ b/src/servers/app/View.h @@ -135,8 +135,7 @@ public: const rgb_color& ViewColor() const { return fViewColor; } - void SetViewColor(const rgb_color& color) - { fViewColor = color; } + void SetViewColor(const rgb_color& color); void ColorUpdated(color_which which, rgb_color color); void SetViewUIColor(color_which which, float tint);