Make Slidingpopus work without PaintClipper

Add correct region to repaint, this just used to be clipped before.
This commit is contained in:
Martin Gräßlin 2011-06-26 14:35:51 +02:00
parent 76eb3c3391
commit 572368ea27

View file

@ -122,25 +122,28 @@ void SlidingPopupsEffect::paintWindow(EffectWindow* w, int mask, QRegion region,
progress = 1.0; progress = 1.0;
} }
const int start = mWindowsData[ w ].start; const int start = mWindowsData[ w ].start;
QRect r;
switch(mWindowsData[ w ].from) { switch(mWindowsData[ w ].from) {
case West: case West:
data.xTranslate += (start - w->width()) * progress; 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; break;
case North: case North:
data.yTranslate += (start - w->height()) * progress; 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; break;
case East: case East:
data.xTranslate += (start - w->x()) * progress; 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; break;
case South: case South:
default: default:
data.yTranslate += (start - w->y()) * progress; 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); effects->paintWindow(w, mask, clippedRegion, data);