Commit 31986988 authored by Martin Flöser's avatar Martin Flöser

Connect Application::screensCreated to WaylandServer::initOutputs

Summary:
Instead of having the Application invoke initOutputs after creating
the Screens, we can just connect to the signal emitted there.

This allows to make initOutputs a private, WaylandServer internal
method.

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1482
parent f8f8e614
......@@ -110,7 +110,6 @@ void WaylandTestApplication::continueStartupWithScreens()
{
disconnect(kwinApp()->platform(), &Platform::screensQueried, this, &WaylandTestApplication::continueStartupWithScreens);
createScreens();
waylandServer()->initOutputs();
createCompositor();
connect(Compositor::self(), &Compositor::sceneCreated, this, &WaylandTestApplication::startXwaylandServer);
......
......@@ -145,7 +145,6 @@ void ApplicationWayland::continueStartupWithScreens()
{
disconnect(kwinApp()->platform(), &Platform::screensQueried, this, &ApplicationWayland::continueStartupWithScreens);
createScreens();
waylandServer()->initOutputs();
if (!m_startXWayland) {
continueStartupWithX();
......
......@@ -73,6 +73,8 @@ WaylandServer::WaylandServer(QObject *parent)
{
qRegisterMetaType<KWayland::Server::SurfaceInterface *>("KWayland::Server::SurfaceInterface *");
qRegisterMetaType<KWayland::Server::OutputInterface::DpmsMode>();
connect(kwinApp(), &Application::screensCreated, this, &WaylandServer::initOutputs);
}
WaylandServer::~WaylandServer()
......
......@@ -74,7 +74,6 @@ public:
virtual ~WaylandServer();
void init(const QByteArray &socketName = QByteArray(), InitalizationFlags flags = InitalizationFlag::NoOptions);
void initOutputs();
void terminateClientConnections();
KWayland::Server::Display *display() {
......@@ -160,6 +159,7 @@ Q_SIGNALS:
void terminatingInternalClientConnection();
private:
void initOutputs();
quint16 createClientId(KWayland::Server::ClientConnection *c);
void destroyInternalConnection();
void configurationChangeRequested(KWayland::Server::OutputConfigurationInterface *config);
......
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