diff --git a/events.cpp b/events.cpp index c8e99288a7..d419dbc684 100644 --- a/events.cpp +++ b/events.cpp @@ -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 } diff --git a/geometry.cpp b/geometry.cpp index 6c8b554876..ad5ac12a58 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -65,10 +65,7 @@ void Workspace::desktopResized() destroyElectricBorders(); updateElectricBorders(); if( compositing() ) - { - finishCompositing(); - QTimer::singleShot( 0, this, SLOT( setupCompositing() ) ); - } + compositeResetTimer.start( 0 ); } /*! diff --git a/workspace.cpp b/workspace.cpp index b40cddab5d..1ec5ca2eff 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -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 diff --git a/workspace.h b/workspace.h index 396b92a1c0..d6c474eb30 100644 --- a/workspace.h +++ b/workspace.h @@ -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();