From f7feca678d082899a623b04d75f9525e57dc09e8 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 25 Feb 2016 12:45:19 +0100 Subject: [PATCH] respect WindowForceBlurRole or forcecontrast MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit even if scaled or translated, if WindowForceBlurRole is set do the blur anyways same thing for backgroundcontrast reviewed by: Martin Gräßlin --- effects/backgroundcontrast/contrast.cpp | 2 +- effects/blur/blur.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/effects/backgroundcontrast/contrast.cpp b/effects/backgroundcontrast/contrast.cpp index b6b40982c6..bbc545c1d8 100644 --- a/effects/backgroundcontrast/contrast.cpp +++ b/effects/backgroundcontrast/contrast.cpp @@ -356,7 +356,7 @@ bool ContrastEffect::shouldContrast(const EffectWindow *w, int mask, const Windo bool scaled = !qFuzzyCompare(data.xScale(), 1.0) && !qFuzzyCompare(data.yScale(), 1.0); bool translated = data.xTranslation() || data.yTranslation(); - if (scaled || ((translated || (mask & PAINT_WINDOW_TRANSFORMED)) && !w->data(WindowForceBackgroundContrastRole).toBool())) + if ((scaled || (translated || (mask & PAINT_WINDOW_TRANSFORMED))) && !w->data(WindowForceBackgroundContrastRole).toBool()) return false; if (!w->hasAlpha()) diff --git a/effects/blur/blur.cpp b/effects/blur/blur.cpp index b044f78440..0fd0936292 100644 --- a/effects/blur/blur.cpp +++ b/effects/blur/blur.cpp @@ -417,7 +417,7 @@ bool BlurEffect::shouldBlur(const EffectWindow *w, int mask, const WindowPaintDa bool scaled = !qFuzzyCompare(data.xScale(), 1.0) && !qFuzzyCompare(data.yScale(), 1.0); bool translated = data.xTranslation() || data.yTranslation(); - if (scaled || ((translated || (mask & PAINT_WINDOW_TRANSFORMED)) && !w->data(WindowForceBlurRole).toBool())) + if ((scaled || (translated || (mask & PAINT_WINDOW_TRANSFORMED))) && !w->data(WindowForceBlurRole).toBool()) return false; bool blurBehindDecos = effects->decorationsHaveAlpha() &&