itamarjp / rpms / gdm

Forked from rpms/gdm 6 years ago
Clone
Blob Blame History Raw
From aafa4070f2905c4848091a78422210951775cd9a Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Thu, 6 Sep 2012 18:20:05 -0400
Subject: [PATCH] slave: fix autologin

An inverted condition in the wants_autologin function means we tried
to start greeter when autologin is runnings.

Since autologin is usually much faster than loading GL/gnome-shell, this bug
is sort of spotty to reproduce.

This commit changes the "delay > 0" check to "delay == 0" which is a
correct indicator of autologin.

https://bugzilla.gnome.org/show_bug.cgi?id=682465
---
 daemon/gdm-simple-slave.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/daemon/gdm-simple-slave.c b/daemon/gdm-simple-slave.c
index b646b78..563f6ed 100644
--- a/daemon/gdm-simple-slave.c
+++ b/daemon/gdm-simple-slave.c
@@ -1215,7 +1215,7 @@ wants_autologin (GdmSimpleSlave *slave)
         /* FIXME: handle wait-for-go */
 
         gdm_slave_get_timed_login_details (GDM_SLAVE (slave), &enabled, NULL, &delay);
-        return enabled && delay > 0;
+        return enabled && delay == 0;
 }
 
 #define INITIAL_SETUP_TRIGGER_FILE LOCALSTATEDIR "/lib/gdm/run-initial-setup"
-- 
1.7.12