chiark / gitweb /
logind: use type to determine graphical sessions (#3071)
[elogind.git] / src / login / logind-session.c
index ff2c95c55d60c3192bbbd36690dd2a1af773bcc0..2ed6b2fa355897c6faa85ced5ecc685c9af01513 100644 (file)
@@ -520,7 +520,7 @@ static int session_start_scope(Session *s) {
                 if (!scope)
                         return log_oom();
 
-                description = strjoina("Session ", s->id, " of user ", s->user->name, NULL);
+                description = strjoina("Session ", s->id, " of user ", s->user->name);
 
                 r = manager_start_scope(
                                 s->manager,
@@ -862,7 +862,7 @@ int session_get_idle_hint(Session *s, dual_timestamp *t) {
 
         /* Graphical sessions should really implement a real
          * idle hint logic */
-        if (s->display)
+        if (SESSION_TYPE_IS_GRAPHICAL(s->type))
                 goto dont_know;
 
         /* For sessions with an explicitly configured tty, let's check