diff options
| author | Uladzislau Nikalayevich <zarevi4Vlad@gmail.com> | 2021-10-18 07:56:37 -0400 |
|---|---|---|
| committer | Marco Trevisan (TreviƱo) <mail@3v1n0.net> | 2021-10-26 14:10:04 +0200 |
| commit | eb67abcc23e5022859b39e61d8aefe976a19c321 (patch) | |
| tree | 77199900b6a2f740ecd2c740fa5c152b2d85a0f8 | |
| parent | 3899b6f8e1866c01029e10b189b97e74c2b60cbf (diff) | |
DecoratedWindow: Do not try to use shaped shadows on empty quads
Windows may have no shaped rectangles, but we're still trying to set them. This is because we might not initialize the shape size, leading to invalid values. LP: #1904337
| -rw-r--r-- | decorations/DecoratedWindow.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/decorations/DecoratedWindow.cpp b/decorations/DecoratedWindow.cpp index ed5548f5e..21f192cb5 100644 --- a/decorations/DecoratedWindow.cpp +++ b/decorations/DecoratedWindow.cpp @@ -750,6 +750,12 @@ void Window::Impl::ComputeShapedShadowQuad() unsigned int radius = active() ? manager_->active_shadow_radius() : manager_->inactive_shadow_radius(); Shape shape(win_->id()); + if (shape.GetRectangles().empty()) + { + shaped_shadow_pixmap_.reset(); + return; + } + auto const& border = win_->borderRect(); auto const& shadow_offset = manager_->shadow_offset(); |
