Commit a74694f6 authored by David Edmundson's avatar David Edmundson
Browse files

[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.
parent 1725e224
Pipeline #191298 passed with stage
in 36 minutes and 28 seconds
......@@ -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
......
......@@ -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:
......
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