diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -526,7 +526,6 @@ 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 --- a/plugins/platforms/x11/standalone/CMakeLists.txt +++ b/plugins/platforms/x11/standalone/CMakeLists.txt @@ -20,7 +20,7 @@ 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 --- a/plugins/platforms/x11/standalone/x11_platform.cpp +++ b/plugins/platforms/x11/standalone/x11_platform.cpp @@ -41,6 +41,8 @@ #include "workspace.h" #include "x11_decoration_renderer.h" +#include + #include #include @@ -76,14 +78,16 @@ m_openGLFreezeProtectionThread->wait(); delete m_openGLFreezeProtectionThread; } + XRenderUtils::cleanup(); } void X11StandalonePlatform::init() { if (!QX11Info::isPlatformX11()) { 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 --- a/plugins/platforms/x11/windowed/CMakeLists.txt +++ b/plugins/platforms/x11/windowed/CMakeLists.txt @@ -6,7 +6,7 @@ ) 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 --- a/plugins/scenes/xrender/CMakeLists.txt +++ b/plugins/scenes/xrender/CMakeLists.txt @@ -15,6 +15,7 @@ add_library(KWinSceneXRender MODULE ${SCENE_XRENDER_SRCS}) target_link_libraries(KWinSceneXRender kwin + kwinxrenderutils ) install( diff --git a/workspace.cpp b/workspace.cpp --- a/workspace.cpp +++ b/workspace.cpp @@ -22,7 +22,6 @@ #include "workspace.h" // kwin libs #include -#include // kwin #ifdef KWIN_BUILD_ACTIVITIES #include "activities.h" @@ -183,10 +182,6 @@ 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 @@ // TODO: ungrabXServer(); - if (kwinApp()->operationMode() == Application::OperationModeX11) { - XRenderUtils::cleanup(); - } Xcb::Extensions::destroy(); _self = 0; }