From af3b302b0508fe6942396b9b87cd080ccf0a87c3 Mon Sep 17 00:00:00 2001 From: Andreas Hartmetz Date: Wed, 10 Sep 2008 04:35:28 +0000 Subject: [PATCH] be more strict about acceptable frame intervals - system time really *can* change without notice. svn path=/trunk/KDE/kdebase/workspace/; revision=859340 --- composite.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composite.cpp b/composite.cpp index ea9f79a188..a931f4ba52 100644 --- a/composite.cpp +++ b/composite.cpp @@ -407,8 +407,8 @@ void Workspace::setCompositeTimer() if( !compositing()) // should not really happen, but there may be e.g. some damage events still pending return; // 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. - compositeTimer.start( qMax ( 0, nextPaintReference.msecsTo( QTime::currentTime()) % compositeRate ) ); + // should be added for the next paint. qBound() for protection; system time can change without notice. + compositeTimer.start( qBound( 0, nextPaintReference.msecsTo( QTime::currentTime() ), 250 ) % compositeRate ); } bool Workspace::createOverlay()