Compress possible several reasons for resetting compositing.

svn path=/trunk/KDE/kdebase/workspace/; revision=923836
This commit is contained in:
Luboš Luňák 2009-02-09 14:37:07 +00:00
parent 1bc2f456d9
commit b50a8d352a
4 changed files with 5 additions and 8 deletions

View file

@ -510,10 +510,7 @@ bool Workspace::workspaceEvent( XEvent * e )
bool changed = ( xrrRefreshRate != XRRConfigCurrentRate( config ));
XRRFreeScreenConfigInfo( config );
if( changed )
{
finishCompositing();
QTimer::singleShot( 0, this, SLOT( setupCompositing() ) );
}
compositeResetTimer.start( 0 );
}
#endif
}

View file

@ -65,10 +65,7 @@ void Workspace::desktopResized()
destroyElectricBorders();
updateElectricBorders();
if( compositing() )
{
finishCompositing();
QTimer::singleShot( 0, this, SLOT( setupCompositing() ) );
}
compositeResetTimer.start( 0 );
}
/*!

View file

@ -172,7 +172,9 @@ Workspace::Workspace( bool restore )
this, SLOT( gotTemporaryRulesMessage(const QString&) ));
connect( &rulesUpdatedTimer, SIGNAL( timeout() ), this, SLOT( writeWindowRules() ));
connect( &unredirectTimer, SIGNAL( timeout() ), this, SLOT( delayedCheckUnredirect() ));
connect( &compositeResetTimer, SIGNAL( timeout()), this, SLOT( resetCompositing()));
unredirectTimer.setSingleShot( true );
compositeResetTimer.setSingleShot( true );
updateXTime(); // Needed for proper initialization of user_time in Client ctor

View file

@ -785,6 +785,7 @@ class Workspace : public QObject, public KDecorationDefines
QTimer unredirectTimer;
bool forceUnredirectCheck;
QList< int > composite_paint_times;
QTimer compositeResetTimer; // for compressing composite resets
private:
friend bool performTransiencyCheck();