[xwl] Restart xwayland regardless of exit value

In the case of an assert, for example a wayland error Xwayland will
exit, but with an exitStatus of "normal exit".

We also trigger a shutdown should kwin encounter an error on the X11
side, this would be a clean exit from an XwaylandLauncher point of view.
It makes sense to try to restart.

Deliberate shutdown is handled by destroying the XwaylandLauncher. This
means it's not an issue for final kwin teardown.
This commit is contained in:
David Edmundson 2022-06-10 15:50:40 +01:00
parent 1725e22483
commit a74694f6ff
2 changed files with 1 additions and 14 deletions

View file

@ -256,20 +256,8 @@ void XwaylandLauncher::maybeDestroyReadyNotifier()
void XwaylandLauncher::handleXwaylandFinished(int exitCode, QProcess::ExitStatus exitStatus)
{
qCDebug(KWIN_XWL) << "Xwayland process has quit with exit code" << exitCode;
qCDebug(KWIN_XWL) << "Xwayland process has quit with exit status:" << exitStatus << "exit code:" << exitCode;
switch (exitStatus) {
case QProcess::NormalExit:
stop();
break;
case QProcess::CrashExit:
handleXwaylandCrashed();
break;
}
}
void XwaylandLauncher::handleXwaylandCrashed()
{
#if KWIN_BUILD_NOTIFICATIONS
KNotification::event(QStringLiteral("xwaylandcrash"), i18n("Xwayland has crashed"));
#endif

View file

@ -86,7 +86,6 @@ Q_SIGNALS:
private Q_SLOTS:
void resetCrashCount();
void handleXwaylandFinished(int exitCode, QProcess::ExitStatus exitStatus);
void handleXwaylandCrashed();
void handleXwaylandError(QProcess::ProcessError error);
private: