]> rtime.felk.cvut.cz Git - sojka/lightdm.git/commitdiff
Stop greeters when we switch away from them
authorRobert Ancell <robert.ancell@canonical.com>
Wed, 17 Jul 2013 05:21:13 +0000 (17:21 +1200)
committerRobert Ancell <robert.ancell@canonical.com>
Wed, 17 Jul 2013 05:21:13 +0000 (17:21 +1200)
src/seat.c

index c96e5551d9baf654843495a7db56d8a39a517e43..f0aab193fe379ee53bcbc4a74918266885dd4019 100644 (file)
@@ -172,8 +172,26 @@ seat_get_sessions (Seat *seat)
 void
 seat_set_active_session (Seat *seat, Session *session)
 {
+    GList *link;
+
     g_return_if_fail (seat != NULL);
+
     SEAT_GET_CLASS (seat)->set_active_session (seat, session);
+  
+    /* Stop any greeters */
+    for (link = seat->priv->sessions; link; link = link->next)
+    {
+        Session *s = link->data;
+
+        if (s == session)
+            continue;
+      
+        if (IS_GREETER (s))
+        {
+            g_debug ("Stopping greeter");
+            session_stop (s);
+        }
+    }
 }
 
 Session *