diff options
| -rw-r--r-- | decorations/DecoratedWindow.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/decorations/DecoratedWindow.cpp b/decorations/DecoratedWindow.cpp index 94162bd54..c9b4f650d 100644 --- a/decorations/DecoratedWindow.cpp +++ b/decorations/DecoratedWindow.cpp @@ -510,11 +510,14 @@ bool Window::Impl::IsRectangular() const GLTexture* Window::Impl::ShadowTexture() const { + if (!IsRectangular()) + return shaped_shadow_pixmap_->texture(); + auto const& mi = manager_->impl_; if (active() || parent_->scaled()) - return IsRectangular() ? mi->active_shadow_pixmap_->texture() : shaped_shadow_pixmap_->texture(); + return mi->active_shadow_pixmap_->texture(); - return IsRectangular() ? mi->inactive_shadow_pixmap_->texture() : shaped_shadow_pixmap_->texture(); + return mi->inactive_shadow_pixmap_->texture(); } unsigned Window::Impl::ShadowRadius() const @@ -798,7 +801,10 @@ void Window::Impl::Draw(GLMatrix const& transformation, } if (glwin_->vertexBuffer()->end()) - glwin_->glDrawTexture(ShadowTexture(), transformation, attrib, mask); + { + if (GLTexture* texture = ShadowTexture()) + glwin_->glDrawTexture(texture, transformation, attrib, mask); + } for (auto const& dtex : bg_textures_) { |
