From e0906c8766cd8e30623ef3d34c81de94e9937d0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 18 Mar 2011 18:06:03 +0100 Subject: [PATCH] Repaint area between offset and window in sliding popups As this area was not repainted it caused visual garbage during animationgs. Most visible with yakuake and a panel at the top. Offset in that case is the upper screenedge while yakuake is positioned below the panel. The area of the panel did not get repainted causing the garbage. CCBUG: 264765 --- effects/slidingpopups/slidingpopups.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/effects/slidingpopups/slidingpopups.cpp b/effects/slidingpopups/slidingpopups.cpp index c47bbab98c..c7a7b5324a 100644 --- a/effects/slidingpopups/slidingpopups.cpp +++ b/effects/slidingpopups/slidingpopups.cpp @@ -126,8 +126,24 @@ void SlidingPopupsEffect::paintWindow(EffectWindow* w, int mask, QRegion region, void SlidingPopupsEffect::postPaintWindow(EffectWindow* w) { - if (mAppearingWindows.contains(w) || mDisappearingWindows.contains(w)) + if (mAppearingWindows.contains(w) || mDisappearingWindows.contains(w)) { w->addRepaintFull(); // trigger next animation repaint + const int start = mWindowsData[ w ].start; + switch(mWindowsData[ w ].from) { + case West: + effects->addRepaint(QRect(start, w->y(), w->x(), w->height())); + break; + case North: + effects->addRepaint(QRect(w->x(), start, w->width(), w->y())); + break; + case East: + effects->addRepaint(QRect(w->x() + w->width(), w->y(), displayWidth() - w->x() - w->width() - start, w->height())); + break; + case South: + default: + effects->addRepaint(QRect(w->x(), w->y()+w->height(), w->width(), displayHeight() - w->y() - w->height() - start)); + } + } effects->postPaintWindow(w); if (mDisappearingWindows.contains(w) && mDisappearingWindows[ w ]->currentValue() >= 1) { delete mDisappearingWindows.take(w);