diff --git a/autotests/integration/kwin_wayland_test.cpp b/autotests/integration/kwin_wayland_test.cpp index dad0fa639b..fdbf9c9c70 100644 --- a/autotests/integration/kwin_wayland_test.cpp +++ b/autotests/integration/kwin_wayland_test.cpp @@ -106,6 +106,7 @@ void WaylandTestApplication::performStartup() if (!platform()->initialize()) { std::exit(1); } + waylandServer()->initPlatform(); createColorManager(); waylandServer()->createInternalConnection(); diff --git a/src/main_wayland.cpp b/src/main_wayland.cpp index 93a182a162..cb3fc2ac35 100644 --- a/src/main_wayland.cpp +++ b/src/main_wayland.cpp @@ -151,6 +151,7 @@ void ApplicationWayland::performStartup() std::exit(1); } + waylandServer()->initPlatform(); createColorManager(); waylandServer()->createInternalConnection(); diff --git a/src/wayland_server.cpp b/src/wayland_server.cpp index 04558c5f1c..f20b4f7428 100644 --- a/src/wayland_server.cpp +++ b/src/wayland_server.cpp @@ -299,7 +299,7 @@ void WaylandServer::registerXdgGenericClient(AbstractClient *client) qCDebug(KWIN_CORE) << "Received invalid xdg client:" << client->surface(); } -void WaylandServer::initOutputs() +void WaylandServer::initPlatform() { connect(kwinApp()->platform(), &Platform::outputAdded, this, &WaylandServer::handleOutputAdded); connect(kwinApp()->platform(), &Platform::outputRemoved, this, &WaylandServer::handleOutputRemoved); @@ -582,8 +582,6 @@ void WaylandServer::initWorkspace() }); } - initOutputs(); - if (hasScreenLockerIntegration()) { if (m_internalConnection.interfacesAnnounced) { initScreenLocker(); diff --git a/src/wayland_server.h b/src/wayland_server.h index ce8cb571c7..a599a6df34 100644 --- a/src/wayland_server.h +++ b/src/wayland_server.h @@ -182,6 +182,7 @@ public: bool hasGlobalShortcutSupport() const; void createInternalConnection(); + void initPlatform(); void initWorkspace(); KWaylandServer::ClientConnection *xWaylandConnection() const; @@ -263,7 +264,6 @@ private: void shellClientShown(Toplevel *t); void destroyInternalConnection(); void initScreenLocker(); - void initOutputs(); void registerXdgGenericClient(AbstractClient *client); void registerXdgToplevelClient(XdgToplevelClient *client); void registerXdgPopupClient(XdgPopupClient *client);