Commit 551a6246 authored by Martin Flöser's avatar Martin Flöser

Move XRenderUtils init/cleanup into X11 standalone platform

Summary:
Only needed for kwin_x11 variant (required for the non-composited
Outline). As that's nowadays in the x11 platform, we can move the
complete XRenderUtils support into the platform. Thus KWin core does
no longer require to link it.

Test Plan: Compiles

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7760
parent 0a6bd71f
......@@ -526,7 +526,6 @@ ki18n_wrap_ui(kwin_KDEINIT_SRCS
set(kwin_OWN_LIBS
kwineffects
kwinxrenderutils
kwin4_effect_builtins
)
......
......@@ -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()
......
......@@ -41,6 +41,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "workspace.h"
#include "x11_decoration_renderer.h"
#include <kwinxrenderutils.h>
#include <KConfigGroup>
#include <KLocalizedString>
......@@ -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();
}
......
......@@ -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
......
......@@ -15,6 +15,7 @@ ecm_qt_declare_logging_category(
add_library(KWinSceneXRender MODULE ${SCENE_XRENDER_SRCS})
target_link_libraries(KWinSceneXRender
kwin
kwinxrenderutils
)
install(
......
......@@ -22,7 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "workspace.h"
// kwin libs
#include <kwinglplatform.h>
#include <kwinxrenderutils.h>
// 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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment