From 71ce1f7a5b6c770e2ef7e3b1a0f2b76853c4124a Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Fri, 13 Nov 2020 13:08:02 +0000 Subject: [PATCH] Add an explicit quit mechanism controlled by plasma On X Kwin's lifespan used to be managed by XSMP. This accidentally broke in 5.20 as we made kwin start before ksmserver for speed purposes. This leaves kwin to be killed by the display manager as the X connection closes, but this can lead to deadlocks. BUG:428817 On wayland kwin's lifespan is mapped to the lifespan of the ksmserver binary. This is problematic as it makes our entire xwayland robustness redundant if we ultimately rely on an application that /has/ to run in xwayland. BUG: 427688 --- org.kde.KWin.Session.xml | 3 +++ sm.cpp | 5 +++++ sm.h | 1 + 3 files changed, 9 insertions(+) diff --git a/org.kde.KWin.Session.xml b/org.kde.KWin.Session.xml index 4e6c96d48a..ad80f052aa 100644 --- a/org.kde.KWin.Session.xml +++ b/org.kde.KWin.Session.xml @@ -19,6 +19,9 @@ + + + diff --git a/sm.cpp b/sm.cpp index 51ff8aaf08..a1a36cb0c6 100644 --- a/sm.cpp +++ b/sm.cpp @@ -379,5 +379,10 @@ void SessionManager::finishSaveSession(const QString &name) emit finishSessionSaveRequested(name); } +void SessionManager::quit() +{ + qApp->quit(); +} + } // namespace diff --git a/sm.h b/sm.h index 6a3594b9bb..e9b6e6fab2 100644 --- a/sm.h +++ b/sm.h @@ -43,6 +43,7 @@ public Q_SLOTS: // DBus API void loadSession(const QString &name); void aboutToSaveSession(const QString &name); void finishSaveSession(const QString &name); + void quit(); private: void setState(SessionState state);