logind: use type to determine graphical sessions (#3071)
authorMichał Bartoszkiewicz <mbartoszkiewicz@gmail.com>
Wed, 20 Apr 2016 08:06:26 +0000 (10:06 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 20 Apr 2016 08:06:26 +0000 (10:06 +0200)
src/login/logind-session.c

index 676fbc1..a8b1d59 100644 (file)
@@ -797,7 +797,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