From d647950ff0eda08b42bd5b5ce340f754b58741ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 27 Apr 2011 14:48:34 +0200 Subject: [PATCH] Do not blur behind EffectFrames with no style --- effects.h | 2 +- effects/blur/blur.cpp | 2 +- libkwineffects/kwineffects.h | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/effects.h b/effects.h index 753447b4a5..66b9ad66f5 100644 --- a/effects.h +++ b/effects.h @@ -345,7 +345,7 @@ public: virtual void setPosition(const QPoint& point); virtual const QString& text() const; virtual void setText(const QString& text); - EffectFrameStyle style() const { + virtual EffectFrameStyle style() const { return m_style; }; Plasma::FrameSvg& frame() { diff --git a/effects/blur/blur.cpp b/effects/blur/blur.cpp index 1dc0a2d085..ce8b73b523 100644 --- a/effects/blur/blur.cpp +++ b/effects/blur/blur.cpp @@ -241,7 +241,7 @@ void BlurEffect::paintEffectFrame(EffectFrame *frame, QRegion region, double opa const QRect screen(0, 0, displayWidth(), displayHeight()); bool valid = target->valid() && shader->isValid(); QRegion shape = frame->geometry().adjusted(-5, -5, 5, 5) & screen; - if (valid && !shape.isEmpty() && region.intersects(shape.boundingRect())) { + if (valid && !shape.isEmpty() && region.intersects(shape.boundingRect()) && frame->style() != EffectFrameNone) { doBlur(shape, screen, opacity * frameOpacity); } effects->paintEffectFrame(frame, region, opacity, frameOpacity); diff --git a/libkwineffects/kwineffects.h b/libkwineffects/kwineffects.h index 23106024f1..126968c356 100644 --- a/libkwineffects/kwineffects.h +++ b/libkwineffects/kwineffects.h @@ -1792,6 +1792,11 @@ public: **/ virtual GLShader* shader() const = 0; + /** + * @returns The style of this EffectFrame. + **/ + virtual EffectFrameStyle style() const = 0; + /** * If @p enable is @c true cross fading between icons and text is enabled * By default disabled. Use setCrossFadeProgress to cross fade.