]> rtime.felk.cvut.cz Git - sojka/lightdm.git/blobdiff - src/seat.c
Support timed autologin
[sojka/lightdm.git] / src / seat.c
index a6e577776fb2c2ef9a5648d8de3dad13c51d5206..55c81d484f410d909116b0a9e09959814b7ee4ac 100644 (file)
@@ -659,14 +659,15 @@ seat_start_with_autologin (Seat *seat, gboolean chained_autologin)
     in_background = do_autologin && !chained_autologin &&
                     seat_get_boolean_property (seat, "autologin-in-background");
 
-    if (in_background)
+    if (in_background && autologin_timeout == 0)
     {
         g_debug ("Autologin in background, opening greeter first");
         do_autologin = FALSE;
         autologin_username = NULL;
         autologin_guest = FALSE;
-        autologin_timeout = 0;
     }
+    if (chained_autologin)
+        autologin_timeout = 0;
 
     return switch_to_user_or_start_greeter (seat, autologin_username, TRUE,
                                             autologin_guest, NULL, FALSE,