From f131270ff3ae6e6b4e2dc965cd05b46e194b48c1 Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Tue, 31 Jul 2018 16:51:13 +0200 Subject: [PATCH] Session reuse: Only consider "online" sessions Otherwise it might switch to already dead sessions ("closing" or "lingering"). --- src/daemon/Display.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/daemon/Display.cpp b/src/daemon/Display.cpp index 86e597e..ec442b0 100644 --- a/src/daemon/Display.cpp +++ b/src/daemon/Display.cpp @@ -290,8 +290,8 @@ namespace SDDM { foreach(const SessionInfo &s, reply.value()) { if (s.userName == user) { OrgFreedesktopLogin1SessionInterface session(Logind::serviceName(), s.sessionPath.path(), QDBusConnection::systemBus()); - if (session.service() == QLatin1String("sddm")) { - m_reuseSessionId = s.sessionId; + if (session.service() == QLatin1String("sddm") && session.state() == QLatin1String("online")) { + m_reuseSessionId = s.sessionId; break; } } -- 2.18.0