diff --git a/kwin/effects/slidingpopups/slidingpopups.cpp b/kwin/effects/slidingpopups/slidingpopups.cpp index 137ff97..d9aa7e9 100644 --- a/kwin/effects/slidingpopups/slidingpopups.cpp +++ b/kwin/effects/slidingpopups/slidingpopups.cpp @@ -195,28 +195,29 @@ void SlidingPopupsEffect::paintWindow(EffectWindow* w, int mask, QRegion region, int splitPoint = 0; switch(mWindowsData[ w ].from) { case West: - data.xTranslate -= w->width() * progress; - splitPoint = w->width() - (w->x() + w->width() - screenRect.x() - start); - region = QRegion(w->x() + splitPoint, w->y(), w->width() - splitPoint, w->height()); + data.xTranslate -=(w->x() + w->width() - start) * progress; + splitPoint = screenRect.x() + start; + region = QRegion(splitPoint, w->y(), w->x() + w->width() - start, w->height()); break; case North: - data.yTranslate -= w->height() * progress; - splitPoint = w->height() - (w->y() + w->height() - screenRect.y() - start); - region = QRegion(w->x(), w->y() + splitPoint, w->width(), w->height() - splitPoint); + data.yTranslate -= (w->y() + w->height() - start) * progress; + splitPoint = screenRect.y() + start; + region = QRegion(w->x(), splitPoint, w->width(), w->y() + w->height() - start); break; case East: - data.xTranslate += w->width() * progress; + data.xTranslate += (screenRect.width() - w->x() - start) * progress; splitPoint = screenRect.x() + screenRect.width() - w->x() - start; region = QRegion(w->x(), w->y(), splitPoint, w->height()); break; case South: default: - data.yTranslate += w->height() * progress; + data.yTranslate += (screenRect.height() - w->y() - start) * progress; splitPoint = screenRect.y() + screenRect.height() - w->y() - start; region = QRegion(w->x(), w->y(), w->width(), splitPoint); } } + effects->addRepaint(region); effects->paintWindow(w, mask, region, data); }