blob: b3ea90ff768c5dd2f4fa38b90a6e3bf8f70823bf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
From f131270ff3ae6e6b4e2dc965cd05b46e194b48c1 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fabian@ritter-vogt.de>
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
|