diff --git a/effects/showpaint/showpaint.cpp b/effects/showpaint/showpaint.cpp
index 9de4649dbb..5a7a044a21 100644
--- a/effects/showpaint/showpaint.cpp
+++ b/effects/showpaint/showpaint.cpp
@@ -31,6 +31,7 @@ along with this program. If not, see .
#include
#include
+#include
namespace KWin
{
@@ -60,6 +61,9 @@ void ShowPaintEffect::paintScreen(int mask, QRegion region, ScreenPaintData& dat
if (effects->compositingType() == XRenderCompositing)
paintXrender();
#endif
+ if (effects->compositingType() == QPainterCompositing) {
+ paintQPainter();
+ }
if (++color_index == sizeof(colors) / sizeof(colors[ 0 ]))
color_index = 0;
}
@@ -115,4 +119,13 @@ void ShowPaintEffect::paintXrender()
#endif
}
+void ShowPaintEffect::paintQPainter()
+{
+ QColor color = colors[ color_index ];
+ color.setAlphaF(0.2);
+ foreach (const QRect & r, painted.rects()) {
+ effects->scenePainter()->fillRect(r, color);
+ }
+}
+
} // namespace
diff --git a/effects/showpaint/showpaint.h b/effects/showpaint/showpaint.h
index 83c48390ef..7765f5fc52 100644
--- a/effects/showpaint/showpaint.h
+++ b/effects/showpaint/showpaint.h
@@ -37,6 +37,7 @@ public:
private:
void paintGL();
void paintXrender();
+ void paintQPainter();
QRegion painted; // what's painted in one pass
int color_index;
};