diff --git a/libkwineffects/kwinglobals.cpp b/libkwineffects/kwinglobals.cpp index 832785c710..b27d4a98fc 100644 --- a/libkwineffects/kwinglobals.cpp +++ b/libkwineffects/kwinglobals.cpp @@ -76,6 +76,10 @@ void Extensions::addData(const char* name) void Extensions::init() { + static bool initPerformed = false; + if (initPerformed) { + return; + } int event_base, error_base; data_nextensions = 0; shape_version = 0; @@ -135,6 +139,7 @@ void Extensions::init() << " render: 0x" << QString::number(render_version, 16) << " fixes: 0x" << QString::number(fixes_version, 16) << " non_native_pixmaps: " << non_native_pixmaps << endl; + initPerformed = true; } void Extensions::fillExtensionsData(const char**& extensions, int& nextensions, int*&opcodes, int*& error_bases) diff --git a/workspace.cpp b/workspace.cpp index ca82319971..926d83be63 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -174,6 +174,10 @@ Workspace::Workspace(bool restore) desktopGrid_[1] = 0; _self = this; + + // first initialize the extensions + Extensions::init(); + // PluginMgr needs access to the config file, so we need to wait for it for finishing reparseConfigFuture.waitForFinished(); options->loadConfig(); @@ -219,7 +223,6 @@ Workspace::Workspace(bool restore) ExposureMask ); - Extensions::init(); compositingSuspended = !options->isUseCompositing(); #ifdef KWIN_BUILD_TABBOX // need to create the tabbox before compositing scene is setup