From 3aa2e22b325d30bb011fd1b02a41b8296418aa07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Tue, 23 Jul 2013 22:35:35 +0200 Subject: [PATCH] fix passive startup feedback BUG: 260727 FIXED-IN: 4.11 REVIEW: 111634 --- effects/startupfeedback/startupfeedback.cpp | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/effects/startupfeedback/startupfeedback.cpp b/effects/startupfeedback/startupfeedback.cpp index e0dc7c4445..ca1964d763 100644 --- a/effects/startupfeedback/startupfeedback.cpp +++ b/effects/startupfeedback/startupfeedback.cpp @@ -164,10 +164,6 @@ void StartupFeedbackEffect::prePaintScreen(ScreenPrePaintData& data, int time) default: break; // nothing } - data.paint.unite(m_dirtyRect); - m_dirtyRect = QRect(); - m_currentGeometry = feedbackRect(); - data.paint.unite(m_currentGeometry); } effects->prePaintScreen(data, time); } @@ -243,18 +239,9 @@ void StartupFeedbackEffect::paintScreen(int mask, QRegion region, ScreenPaintDat void StartupFeedbackEffect::postPaintScreen() { if (m_active) { - switch(m_type) { - case BouncingFeedback: // fall through - case BlinkingFeedback: - // repaint the icon - m_dirtyRect = m_currentGeometry; - effects->addRepaint(m_dirtyRect); - break; - case PassiveFeedback: // fall through - default: - // no need to repaint - no change - break; - } + m_dirtyRect = m_currentGeometry; // ensure the now dirty region is cleaned on the next pass + if (m_type == BlinkingFeedback || m_type == BouncingFeedback) + effects->addRepaint(m_dirtyRect); // we also have to trigger a repaint } effects->postPaintScreen(); } @@ -324,7 +311,7 @@ void StartupFeedbackEffect::start(const QString& icon) iconPixmap = SmallIcon("system-run"); prepareTextures(iconPixmap); m_dirtyRect = m_currentGeometry = feedbackRect(); - effects->addRepaintFull(); + effects->addRepaint(m_dirtyRect); } void StartupFeedbackEffect::stop()