fix passive startup feedback

Desktop / KDE / KDE Workspace - Thomas Lübking [gmail.com] - 24 July 2013 14:04 EDT

BUG: 260727 FIXED-IN: 4.11 REVIEW: 111634

###

diff --git a/kwin/effects/startupfeedback/startupfeedback.cpp b/kwin/effects/startupfeedback/startupfeedback.cpp
index e0dc7c4..ca1964d 100644
--- a/kwin/effects/startupfeedback/startupfeedback.cpp
+++ b/kwin/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()

b5543b2 fix passive startup feedback
kwin/effects/startupfeedback/startupfeedback.cpp | 21 ++++-----------------
1 file changed, 4 insertions(+), 17 deletions(-)

Upstream: quickgit.kde.org


  • Share