From 309fbf1837863c483b04491eda8af8bc5235260a Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 29 May 2020 09:11:04 +0300 Subject: [PATCH] [effects/blur] Don't blur outside the frame rect We need to clip the blur region to ensure that the background behind client side drop shadows is not blurred. BUG: 422202 --- effects/blur/blur.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/effects/blur/blur.cpp b/effects/blur/blur.cpp index 27af34e6a0..9200448371 100644 --- a/effects/blur/blur.cpp +++ b/effects/blur/blur.cpp @@ -417,7 +417,7 @@ QRegion BlurEffect::blurRegion(const EffectWindow *w) const const QRegion appRegion = qvariant_cast(value); if (!appRegion.isEmpty()) { if (w->decorationHasAlpha() && effects->decorationSupportsBlurBehind()) { - region = w->shape(); + region = w->shape() & w->rect(); region -= w->decorationInnerRect(); } region |= appRegion.translated(w->contentsRect().topLeft()) & @@ -425,12 +425,12 @@ QRegion BlurEffect::blurRegion(const EffectWindow *w) const } else { // An empty region means that the blur effect should be enabled // for the whole window. - region = w->shape(); + region = w->shape() & w->rect(); } } else if (w->decorationHasAlpha() && effects->decorationSupportsBlurBehind()) { // If the client hasn't specified a blur region, we'll only enable // the effect behind the decoration. - region = w->shape(); + region = w->shape() & w->rect(); region -= w->decorationInnerRect(); }