Export our nested environment to kwin's env
In the recent refactor we made it so environment variables got synced to the Application::processStartupEnvironment. It then seemed safe and cleaner to remove the qputenv calls, but this was not the case. It regressed the unit tests on CI and kglobalaccel which is another path where kwin spawns clients.
This commit is contained in:
parent
6104dc50cf
commit
2b88432b17
2 changed files with 3 additions and 0 deletions
|
@ -717,6 +717,7 @@ int main(int argc, char * argv[])
|
|||
QObject::connect(&a, &KWin::Application::workspaceCreated, server, &KWin::WaylandServer::initWorkspace);
|
||||
if (!server->socketName().isEmpty()) {
|
||||
environment.insert(QStringLiteral("WAYLAND_DISPLAY"), server->socketName());
|
||||
qputenv("WAYLAND_DISPLAY", server->socketName().toUtf8());
|
||||
}
|
||||
a.setProcessStartupEnvironment(environment);
|
||||
|
||||
|
|
|
@ -388,6 +388,8 @@ void Xwayland::handleXwaylandReady()
|
|||
auto env = m_app->processStartupEnvironment();
|
||||
env.insert(QStringLiteral("DISPLAY"), m_displayName);
|
||||
env.insert(QStringLiteral("XAUTHORITY"), m_xAuthority);
|
||||
qputenv("DISPLAY", m_displayName.toUtf8());
|
||||
qputenv("XAUTHORITY", m_xAuthority.toUtf8());
|
||||
m_app->setProcessStartupEnvironment(env);
|
||||
|
||||
Xcb::sync(); // Trigger possible errors, there's still a chance to abort
|
||||
|
|
Loading…
Reference in a new issue