fix passive startup feedback

BUG: 260727
FIXED-IN: 4.11
REVIEW: 111634
This commit is contained in:
Thomas Lübking 2013-07-23 22:35:35 +02:00
parent 10e7ef75ba
commit 3aa2e22b32

View file

@ -164,10 +164,6 @@ void StartupFeedbackEffect::prePaintScreen(ScreenPrePaintData& data, int time)
default: default:
break; // nothing break; // nothing
} }
data.paint.unite(m_dirtyRect);
m_dirtyRect = QRect();
m_currentGeometry = feedbackRect();
data.paint.unite(m_currentGeometry);
} }
effects->prePaintScreen(data, time); effects->prePaintScreen(data, time);
} }
@ -243,18 +239,9 @@ void StartupFeedbackEffect::paintScreen(int mask, QRegion region, ScreenPaintDat
void StartupFeedbackEffect::postPaintScreen() void StartupFeedbackEffect::postPaintScreen()
{ {
if (m_active) { if (m_active) {
switch(m_type) { m_dirtyRect = m_currentGeometry; // ensure the now dirty region is cleaned on the next pass
case BouncingFeedback: // fall through if (m_type == BlinkingFeedback || m_type == BouncingFeedback)
case BlinkingFeedback: effects->addRepaint(m_dirtyRect); // we also have to trigger a repaint
// repaint the icon
m_dirtyRect = m_currentGeometry;
effects->addRepaint(m_dirtyRect);
break;
case PassiveFeedback: // fall through
default:
// no need to repaint - no change
break;
}
} }
effects->postPaintScreen(); effects->postPaintScreen();
} }
@ -324,7 +311,7 @@ void StartupFeedbackEffect::start(const QString& icon)
iconPixmap = SmallIcon("system-run"); iconPixmap = SmallIcon("system-run");
prepareTextures(iconPixmap); prepareTextures(iconPixmap);
m_dirtyRect = m_currentGeometry = feedbackRect(); m_dirtyRect = m_currentGeometry = feedbackRect();
effects->addRepaintFull(); effects->addRepaint(m_dirtyRect);
} }
void StartupFeedbackEffect::stop() void StartupFeedbackEffect::stop()