diff --git a/composite.cpp b/composite.cpp
index f5f7038695..a9f8389132 100644
--- a/composite.cpp
+++ b/composite.cpp
@@ -195,6 +195,10 @@ void Workspace::slotCompositingOptionsInitialized()
foreach (Unmanaged * c, unmanaged)
c->setupCompositing();
discardPopup(); // force re-creation of the Alt+F3 popup (opacity option)
+
+ // render at least once
+ compositeTimer.stop();
+ performCompositing();
}
void Workspace::finishCompositing()
diff --git a/effects.cpp b/effects.cpp
index ece7950520..868364f406 100644
--- a/effects.cpp
+++ b/effects.cpp
@@ -36,6 +36,8 @@ along with this program. If not, see .
#include "kwinglutils.h"
#include
+#include
+#include
#include "kdebug.h"
#include "klibrary.h"
@@ -165,12 +167,25 @@ void EffectsHandlerImpl::setupUnmanagedConnections(Unmanaged* u)
void EffectsHandlerImpl::reconfigure()
{
- KSharedConfig::Ptr _config = KGlobal::config();
- KConfigGroup conf(_config, "Plugins");
+ // perform querying for the services in a thread
+ QFutureWatcher *watcher = new QFutureWatcher(this);
+ connect(watcher, SIGNAL(finished()), this, SLOT(slotEffectsQueried()));
+ watcher->setFuture(QtConcurrent::run(KServiceTypeTrader::self(), &KServiceTypeTrader::query, QString("KWin/Effect"), QString()));
+}
- KService::List offers = KServiceTypeTrader::self()->query("KWin/Effect");
+void EffectsHandlerImpl::slotEffectsQueried()
+{
+ QFutureWatcher *watcher = dynamic_cast< QFutureWatcher* >(sender());
+ if (!watcher) {
+ // slot invoked not from a FutureWatcher
+ return;
+ }
+
+ KService::List offers = watcher->result();
QStringList effectsToBeLoaded;
QStringList checkDefault;
+ KSharedConfig::Ptr _config = KGlobal::config();
+ KConfigGroup conf(_config, "Plugins");
// First unload necessary effects
foreach (const KService::Ptr & service, offers) {
@@ -202,6 +217,7 @@ void EffectsHandlerImpl::reconfigure()
if (!newLoaded.contains(ep.first)) // don't reconfigure newly loaded effects
ep.second->reconfigure(Effect::ReconfigureAll);
}
+ watcher->deleteLater();
}
// the idea is that effects call this function again which calls the next one
diff --git a/effects.h b/effects.h
index 19aefa2553..a110242584 100644
--- a/effects.h
+++ b/effects.h
@@ -216,6 +216,9 @@ protected:
int next_window_quad_type;
int mouse_poll_ref_count;
+private Q_SLOTS:
+ void slotEffectsQueried();
+
private:
QList< Effect* > m_activeEffects;
QList< Effect* >::iterator m_currentDrawWindowIterator;