From 572368ea278a0868bcef858e1680f942981a21e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sun, 26 Jun 2011 14:35:51 +0200 Subject: [PATCH] Make Slidingpopus work without PaintClipper Add correct region to repaint, this just used to be clipped before. --- effects/slidingpopups/slidingpopups.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/effects/slidingpopups/slidingpopups.cpp b/effects/slidingpopups/slidingpopups.cpp index d201ac2b33..34bdac4049 100644 --- a/effects/slidingpopups/slidingpopups.cpp +++ b/effects/slidingpopups/slidingpopups.cpp @@ -122,25 +122,28 @@ void SlidingPopupsEffect::paintWindow(EffectWindow* w, int mask, QRegion region, progress = 1.0; } const int start = mWindowsData[ w ].start; + QRect r; switch(mWindowsData[ w ].from) { case West: data.xTranslate += (start - w->width()) * progress; - clippedRegion = clippedRegion.subtracted(QRegion(start - w->width(), w->y(), w->width(), w->height())); + r = QRect(start - w->width(), w->y(), w->width(), w->height()); break; case North: data.yTranslate += (start - w->height()) * progress; - clippedRegion = clippedRegion.subtracted(QRegion(w->x(), start - w->height(), w->width(), w->height())); + r = QRect(w->x(), start - w->height(), w->width(), w->height()); break; case East: data.xTranslate += (start - w->x()) * progress; - clippedRegion = clippedRegion.subtracted(QRegion(w->x() + w->width(), w->y(), w->width(), w->height())); + r = QRect(w->x() + w->width(), w->y(), w->width(), w->height()); break; case South: default: data.yTranslate += (start - w->y()) * progress; - clippedRegion = clippedRegion.subtracted(QRegion(w->x(), start, w->width(), w->height())); + r = QRect(w->x(), start, w->width(), w->height()); } + clippedRegion = clippedRegion.subtracted(r); + effects->addRepaint(r); } effects->paintWindow(w, mask, clippedRegion, data);