logind: consider "greeter" sessions suitable as "display" sessions of a user

Interestingly, elect_display_compare() already ordered "user" sessions
before "greeter" sessions, though nothing other than "user" sessions
where ever considered anyway.

Fixes: #12399
This commit is contained in:
Lennart Poettering
2019-05-24 15:05:27 +02:00
parent 19483c60bb
commit a2dcb1d787
+1 -1
View 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) {