be more strict about acceptable frame intervals - system time really *can* change without notice.

svn path=/trunk/KDE/kdebase/workspace/; revision=859340
icc-effect-5.14.5
Andreas Hartmetz 2008-09-10 04:35:28 +00:00
parent 56a323877e
commit af3b302b05
1 changed files with 2 additions and 2 deletions

View File

@ -407,8 +407,8 @@ void Workspace::setCompositeTimer()
if( !compositing()) // should not really happen, but there may be e.g. some damage events still pending if( !compositing()) // should not really happen, but there may be e.g. some damage events still pending
return; return;
// The last paint set nextPaintReference as a reference time to which multiples of compositeRate // The last paint set nextPaintReference as a reference time to which multiples of compositeRate
// should be added for the next paint. qMax() is a guard against negative moduli when the day changes. // should be added for the next paint. qBound() for protection; system time can change without notice.
compositeTimer.start( qMax ( 0, nextPaintReference.msecsTo( QTime::currentTime()) % compositeRate ) ); compositeTimer.start( qBound( 0, nextPaintReference.msecsTo( QTime::currentTime() ), 250 ) % compositeRate );
} }
bool Workspace::createOverlay() bool Workspace::createOverlay()