Make Slidingpopus work without PaintClipper

Add correct region to repaint, this just used to be clipped before.
icc-effect-5.14.5
Martin Gräßlin 2011-06-26 14:35:51 +02:00
parent 76eb3c3391
commit 572368ea27
1 changed files with 7 additions and 4 deletions

View File

@ -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);