From 0fdd7d3f7dfa72bc267b2f5c063121d553688444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 24 Jun 2013 08:13:29 +0200 Subject: [PATCH] Resize effect supports QPainter compositing --- effects/resize/resize.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/effects/resize/resize.cpp b/effects/resize/resize.cpp index a24e1241f7..86b106f653 100644 --- a/effects/resize/resize.cpp +++ b/effects/resize/resize.cpp @@ -30,6 +30,7 @@ along with this program. If not, see . #include #include +#include namespace KWin { @@ -118,6 +119,15 @@ void ResizeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Window rects.count(), rects.constData()); } #endif + if (effects->compositingType() == QPainterCompositing) { + QPainter *painter = effects->scenePainter(); + painter->save(); + color.setAlphaF(alpha); + foreach (const QRect &r, paintRegion.rects()) { + painter->fillRect(r, color); + } + painter->restore(); + } } } else { AnimationEffect::paintWindow(w, mask, region, data);