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.
This commit is contained in:
Vlad Zahorodnii 2021-05-13 13:28:20 +03:00 committed by Aleix Pol Gonzalez
parent 0efc9e8e7f
commit 7d0cad07fb
4 changed files with 4 additions and 4 deletions

View file

@ -106,6 +106,7 @@ void WaylandTestApplication::performStartup()
if (!platform()->initialize()) {
std::exit(1);
}
waylandServer()->initPlatform();
createColorManager();
waylandServer()->createInternalConnection();

View file

@ -151,6 +151,7 @@ void ApplicationWayland::performStartup()
std::exit(1);
}
waylandServer()->initPlatform();
createColorManager();
waylandServer()->createInternalConnection();

View file

@ -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();

View file

@ -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);