From a6ff3001c8ba2acc8ec8c288e96bbd86320b675a Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Mon, 31 Aug 2020 15:50:50 +0300 Subject: [PATCH] xwayland: Send a notification when Xwayland crashes Send a notification when Xwayland crashes to provide the user some feedback regarding why all X11 clients have disappeared. --- kwin.notifyrc | 5 +++++ xwl/xwayland.cpp | 2 ++ 2 files changed, 7 insertions(+) diff --git a/kwin.notifyrc b/kwin.notifyrc index 4208452a1d..eae0b17c7c 100644 --- a/kwin.notifyrc +++ b/kwin.notifyrc @@ -287,3 +287,8 @@ Comment[x-test]=xxA graphics reset event occurredxx Comment[zh_CN]=发生了图形重置事件 Comment[zh_TW]=發生了圖形重置事件 Action=Popup + +[Event/xwaylandcrash] +Name=Xwayland Crash +Comment=Xwayland has crashed +Action=Popup diff --git a/xwl/xwayland.cpp b/xwl/xwayland.cpp index fc72766105..8019f5d2d6 100644 --- a/xwl/xwayland.cpp +++ b/xwl/xwayland.cpp @@ -19,6 +19,7 @@ #include "xwayland_logging.h" #include +#include #include #include @@ -243,6 +244,7 @@ void Xwayland::handleXwaylandFinished(int exitCode, QProcess::ExitStatus exitSta void Xwayland::handleXwaylandCrashed() { + KNotification::event(QStringLiteral("xwaylandcrash"), i18n("Xwayland has crashed")); m_resetCrashCountTimer->stop(); switch (options->xwaylandCrashPolicy()) {