From e59867dd921851ad28e609f6342d0550986a0c7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= Date: Sat, 16 Mar 2013 11:34:14 +0100 Subject: [PATCH 1/3] kwin/blur: Fetch all the blur regions in the ctor Otherwise the content below windows that were created before the effect was instantiated won't be blurred. --- effects/blur/blur.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/effects/blur/blur.cpp b/effects/blur/blur.cpp index 3b10b9bc42..1873c69c81 100644 --- a/effects/blur/blur.cpp +++ b/effects/blur/blur.cpp @@ -61,10 +61,15 @@ BlurEffect::BlurEffect() } else { XDeleteProperty(display(), rootWindow(), net_wm_blur_region); } + connect(effects, SIGNAL(windowAdded(KWin::EffectWindow*)), this, SLOT(slotWindowAdded(KWin::EffectWindow*))); connect(effects, SIGNAL(windowDeleted(KWin::EffectWindow*)), this, SLOT(slotWindowDeleted(KWin::EffectWindow*))); connect(effects, SIGNAL(propertyNotify(KWin::EffectWindow*,long)), this, SLOT(slotPropertyNotify(KWin::EffectWindow*,long))); connect(effects, SIGNAL(screenGeometryChanged(QSize)), this, SLOT(slotScreenGeometryChanged())); + + // Fetch the blur regions for all windows + foreach (EffectWindow *window, effects->stackingOrder()) + updateBlurRegion(window); } BlurEffect::~BlurEffect() From 2cec03dede6bc90e071dca8cacb2e833aba22690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= Date: Thu, 21 Mar 2013 16:31:06 +0100 Subject: [PATCH 2/3] kwin: Fix the blend function in the lanczos filter The alpha values are pre-multiplied. --- lanczosfilter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lanczosfilter.cpp b/lanczosfilter.cpp index ef79837f6c..b0f85e2e8f 100644 --- a/lanczosfilter.cpp +++ b/lanczosfilter.cpp @@ -208,7 +208,7 @@ void LanczosFilter::performPaint(EffectWindowImpl* w, int mask, QRegion region, } if (effects->compositingType() == OpenGL2Compositing) { glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); const qreal rgb = data.brightness() * data.opacity(); const qreal a = data.opacity(); @@ -344,7 +344,7 @@ void LanczosFilter::performPaint(EffectWindowImpl* w, int mask, QRegion region, } if (effects->compositingType() == OpenGL2Compositing) { glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); const qreal rgb = data.brightness() * data.opacity(); const qreal a = data.opacity(); From cd93f3c486f71de8609fde62061052c3c8e992ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= Date: Thu, 21 Mar 2013 16:38:23 +0100 Subject: [PATCH 3/3] kwin/cube: Fix the panel shadow being clipped out The shadow was being clipped out while the slide animation was running. --- effects/cube/cubeslide.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/effects/cube/cubeslide.cpp b/effects/cube/cubeslide.cpp index aa933ae971..78cb58d514 100644 --- a/effects/cube/cubeslide.cpp +++ b/effects/cube/cubeslide.cpp @@ -98,12 +98,12 @@ void CubeSlideEffect::paintScreen(int mask, QRegion region, ScreenPaintData& dat if (dontSlidePanels) { foreach (EffectWindow * w, panels) { WindowPaintData wData(w); - effects->paintWindow(w, 0, QRegion(w->x(), w->y(), w->width(), w->height()), wData); + effects->paintWindow(w, 0, infiniteRegion(), wData); } } foreach (EffectWindow * w, stickyWindows) { WindowPaintData wData(w); - effects->paintWindow(w, 0, QRegion(w->x(), w->y(), w->width(), w->height()), wData); + effects->paintWindow(w, 0, infiniteRegion(), wData); } } else effects->paintScreen(mask, region, data);