summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2015-07-16 18:46:12 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2015-07-16 18:46:12 +0200
commit281033284352ed7651e84d228dad780dc2ef299f (patch)
treeff884fc25f317c9b74a28f2a62a74f7dcfa101f3 /src/login
parent304ae2b9a19cd014a7f93830103bb4694efd841f (diff)
logind: never select closing sessions for a VT
If a session is in closing state (and already got rid of its VT), then never re-select it for that VT. There is no reason why we should grant something to a session that is already going away *AND* already got rid of exactly that.
Diffstat (limited to 'src/login')
-rw-r--r--src/login/logind-seat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c
index 1179ce937e..495ec50be0 100644
--- a/src/login/logind-seat.c
+++ b/src/login/logind-seat.c
@@ -486,7 +486,7 @@ void seat_evict_position(Seat *s, Session *session) {
* position (eg., during gdm->session transition), so let's look
* for it and set it on the free slot. */
LIST_FOREACH(sessions_by_seat, iter, s->sessions) {
- if (iter->position == pos) {
+ if (iter->position == pos && session_get_state(iter) != SESSION_CLOSING) {
s->positions[pos] = iter;
break;
}