Commit 7d0cad07 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii Committed by Aleix Pol Gonzalez
Browse files

autotests: Fix XwaylandInputTest

For some reason, Xwayland doesn't like starting without outputs. If
outputs are added later, it sends bogus EnterNotify and LeaveNotify
events.
parent 0efc9e8e
......@@ -106,6 +106,7 @@ void WaylandTestApplication::performStartup()
if (!platform()->initialize()) {
std::exit(1);
}
waylandServer()->initPlatform();
createColorManager();
waylandServer()->createInternalConnection();
......
......@@ -151,6 +151,7 @@ void ApplicationWayland::performStartup()
std::exit(1);
}
waylandServer()->initPlatform();
createColorManager();
waylandServer()->createInternalConnection();
......
......@@ -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();
......
......@@ -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);
......
Supports Markdown
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