summaryrefslogtreecommitdiff
path: root/decorations
diff options
Diffstat (limited to 'decorations')
-rw-r--r--decorations/DecoratedWindow.cpp10
-rw-r--r--decorations/DecorationsPriv.h1
2 files changed, 9 insertions, 2 deletions
diff --git a/decorations/DecoratedWindow.cpp b/decorations/DecoratedWindow.cpp
index 9d983a277..da4c4d743 100644
--- a/decorations/DecoratedWindow.cpp
+++ b/decorations/DecoratedWindow.cpp
@@ -510,9 +510,14 @@ bool Window::Impl::IsRectangular() const
GLTexture* Window::Impl::ShadowTexture() const
{
- if (!IsRectangular())
+ if (shaped_shadow_pixmap_)
return shaped_shadow_pixmap_->texture();
+ return SharedShadowTexture();
+}
+
+GLTexture* Window::Impl::SharedShadowTexture() const
+{
auto const& mi = manager_->impl_;
if (active() || parent_->scaled())
return mi->active_shadow_pixmap_->texture();
@@ -581,7 +586,7 @@ void Window::Impl::ComputeShadowQuads()
return;
}
- const auto* texture = ShadowTexture();
+ const auto* texture = SharedShadowTexture();
if (!texture || !texture->width() || !texture->height())
return;
@@ -712,6 +717,7 @@ void Window::Impl::ComputeShapedShadowQuad()
if (!last_shadow_rect_.isEmpty())
last_shadow_rect_.setGeometry(0, 0, 0, 0);
+ shaped_shadow_pixmap_ = nullptr;
return;
}
diff --git a/decorations/DecorationsPriv.h b/decorations/DecorationsPriv.h
index 7380a3ce7..3faac1c73 100644
--- a/decorations/DecorationsPriv.h
+++ b/decorations/DecorationsPriv.h
@@ -120,6 +120,7 @@ private:
bool ShouldBeDecorated() const;
bool IsRectangular() const;
GLTexture* ShadowTexture() const;
+ GLTexture* SharedShadowTexture() const;
unsigned ShadowRadius() const;
std::string const& GetMenusPanelID() const;