Use QProcessEnvironment::InheritFromParent on X11

Before 885e9acb6e
Application::processStartupEnvironment() returned
QProcessEnvironment::systemEnvironment() which means the current
environment of KWin when this function was called. By setting
InheritFromParent we can replicate this behavior.
This fixes KWin starting processes on X11.
This commit is contained in:
David Redondo 2023-09-13 14:25:24 +02:00
parent 1739388b00
commit eb9130ac64

View file

@ -402,6 +402,8 @@ int main(int argc, char *argv[])
qunsetenv("QT_QPA_PLATFORM"); qunsetenv("QT_QPA_PLATFORM");
qunsetenv("QT_ENABLE_HIGHDPI_SCALING"); qunsetenv("QT_ENABLE_HIGHDPI_SCALING");
a.setProcessStartupEnvironment(QProcessEnvironment(QProcessEnvironment::InheritFromParent));
KSignalHandler::self()->watchSignal(SIGTERM); KSignalHandler::self()->watchSignal(SIGTERM);
KSignalHandler::self()->watchSignal(SIGINT); KSignalHandler::self()->watchSignal(SIGINT);
KSignalHandler::self()->watchSignal(SIGHUP); KSignalHandler::self()->watchSignal(SIGHUP);