diff --git a/CMakeLists.txt b/CMakeLists.txt
index e03d5738ec..ed0ef631a3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -526,7 +526,6 @@ ki18n_wrap_ui(kwin_KDEINIT_SRCS
set(kwin_OWN_LIBS
kwineffects
- kwinxrenderutils
kwin4_effect_builtins
)
diff --git a/plugins/platforms/x11/standalone/CMakeLists.txt b/plugins/platforms/x11/standalone/CMakeLists.txt
index 20bab3f5aa..de2fa07f43 100644
--- a/plugins/platforms/x11/standalone/CMakeLists.txt
+++ b/plugins/platforms/x11/standalone/CMakeLists.txt
@@ -20,7 +20,7 @@ if(HAVE_EPOXY_GLX)
endif()
add_library(KWinX11Platform MODULE ${X11PLATFORM_SOURCES})
-target_link_libraries(KWinX11Platform eglx11common kwin Qt5::X11Extras XCB::CURSOR)
+target_link_libraries(KWinX11Platform eglx11common kwin kwinxrenderutils Qt5::X11Extras XCB::CURSOR)
if(X11_Xinput_FOUND)
target_link_libraries(KWinX11Platform ${X11_Xinput_LIB})
endif()
diff --git a/plugins/platforms/x11/standalone/x11_platform.cpp b/plugins/platforms/x11/standalone/x11_platform.cpp
index a2924d6862..2788908e1a 100644
--- a/plugins/platforms/x11/standalone/x11_platform.cpp
+++ b/plugins/platforms/x11/standalone/x11_platform.cpp
@@ -41,6 +41,8 @@ along with this program. If not, see .
#include "workspace.h"
#include "x11_decoration_renderer.h"
+#include
+
#include
#include
@@ -76,6 +78,7 @@ X11StandalonePlatform::~X11StandalonePlatform()
m_openGLFreezeProtectionThread->wait();
delete m_openGLFreezeProtectionThread;
}
+ XRenderUtils::cleanup();
}
void X11StandalonePlatform::init()
@@ -84,6 +87,7 @@ void X11StandalonePlatform::init()
emit initFailed();
return;
}
+ XRenderUtils::init(kwinApp()->x11Connection(), kwinApp()->x11RootWindow());
setReady(true);
emit screensQueried();
}
diff --git a/plugins/platforms/x11/windowed/CMakeLists.txt b/plugins/platforms/x11/windowed/CMakeLists.txt
index 2647bcc1f7..1c445c5b5f 100644
--- a/plugins/platforms/x11/windowed/CMakeLists.txt
+++ b/plugins/platforms/x11/windowed/CMakeLists.txt
@@ -6,7 +6,7 @@ set(X11BACKEND_SOURCES
)
add_library(KWinWaylandX11Backend MODULE ${X11BACKEND_SOURCES})
-target_link_libraries(KWinWaylandX11Backend eglx11common kwin X11::XCB SceneQPainterBackend)
+target_link_libraries(KWinWaylandX11Backend eglx11common kwin kwinxrenderutils X11::XCB SceneQPainterBackend)
install(
TARGETS
diff --git a/plugins/scenes/xrender/CMakeLists.txt b/plugins/scenes/xrender/CMakeLists.txt
index 8e8c67ed37..61ecea5ea5 100644
--- a/plugins/scenes/xrender/CMakeLists.txt
+++ b/plugins/scenes/xrender/CMakeLists.txt
@@ -15,6 +15,7 @@ ecm_qt_declare_logging_category(
add_library(KWinSceneXRender MODULE ${SCENE_XRENDER_SRCS})
target_link_libraries(KWinSceneXRender
kwin
+ kwinxrenderutils
)
install(
diff --git a/workspace.cpp b/workspace.cpp
index d62c2a71c9..3a0d6dd120 100644
--- a/workspace.cpp
+++ b/workspace.cpp
@@ -22,7 +22,6 @@ along with this program. If not, see .
#include "workspace.h"
// kwin libs
#include
-#include
// kwin
#ifdef KWIN_BUILD_ACTIVITIES
#include "activities.h"
@@ -183,10 +182,6 @@ Workspace::Workspace(const QString &sessionKey)
TabBox::TabBox::create(this);
#endif
- // init XRenderUtils
- if (kwinApp()->operationMode() == Application::OperationModeX11) {
- XRenderUtils::init(connection(), rootWindow());
- }
if (Compositor::self()) {
m_compositor = Compositor::self();
} else {
@@ -514,9 +509,6 @@ Workspace::~Workspace()
// TODO: ungrabXServer();
- if (kwinApp()->operationMode() == Application::OperationModeX11) {
- XRenderUtils::cleanup();
- }
Xcb::Extensions::destroy();
_self = 0;
}