Fix kwin crash when using animated effects.

BUG: 263383
This commit is contained in:
Dr. Robert Marmorstein 2011-02-07 21:05:40 -05:00
parent 6cb8ffd7f6
commit d87d4028c1

View file

@ -146,11 +146,11 @@ void StartupFeedbackEffect::prePaintScreen( ScreenPrePaintData& data, int time )
{
case BouncingFeedback:
m_progress = (m_progress + time) % BOUNCE_DURATION;
m_frame = qRound( (qreal)m_progress / (qreal)BOUNCE_FRAME_DURATION );
m_frame = qRound( (qreal)m_progress / (qreal)BOUNCE_FRAME_DURATION ) % BOUNCE_FRAMES;
break;
case BlinkingFeedback:
m_progress = (m_progress + time) % BLINKING_DURATION;
m_frame = qRound( (qreal)m_progress / (qreal)BLINKING_FRAME_DURATION );
m_frame = qRound( (qreal)m_progress / (qreal)BLINKING_FRAME_DURATION ) % BLINKING_FRAMES;
break;
default:
break; // nothing