]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
logind: consider "greeter" sessions suitable as "display" sessions of a user
authorLennart Poettering <lennart@poettering.net>
Sun, 28 Apr 2019 09:24:15 +0000 (11:24 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 24 May 2019 13:05:27 +0000 (15:05 +0200)
Interestingly, elect_display_compare() already ordered "user" sessions
before "greeter" sessions, though nothing other than "user" sessions
where ever considered anyway.

Fixes: #12399
src/login/logind-user.c

index c5d442865cc39ec102c305cc463fe37d181db83e..05c57c1c327ff8c815169a390a49f12eace5796a 100644 (file)
@@ -663,7 +663,7 @@ static bool elect_display_filter(Session *s) {
         /* Return true if the session is a candidate for the user’s ‘primary session’ or ‘display’. */
         assert(s);
 
-        return s->class == SESSION_USER && s->started && !s->stopping;
+        return IN_SET(s->class, SESSION_USER, SESSION_GREETER) && s->started && !s->stopping;
 }
 
 static int elect_display_compare(Session *s1, Session *s2) {