[gnome-session] manager: don't connect to systemd until exported on bus



commit cd84c507fc692536562d3f1934d01f00612b6be8
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Mar 6 18:13:40 2015 -0500

    manager: don't connect to systemd until exported on bus
    
    We now properly resync our active state after being exported
    over the bus, but we still have a signal connection set up
    prematurely.  If it did get called, it would lead to scary
    messages on the console.
    
    This commit moves the signal connection down to the same place
    we test our active state at startup.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=745762

 gnome-session/gsm-manager.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c
index 70ef94f..4688475 100644
--- a/gnome-session/gsm-manager.c
+++ b/gnome-session/gsm-manager.c
@@ -3210,6 +3210,9 @@ register_manager (GsmManager *manager)
         manager->priv->connection = connection;
         manager->priv->skeleton = skeleton;
 
+        g_signal_connect (manager->priv->system, "notify::active",
+                          G_CALLBACK (on_gsm_system_active_changed), manager);
+
         /* cold-plug SessionIsActive */
         on_gsm_system_active_changed (manager->priv->system, NULL, manager);
 
@@ -3268,9 +3271,6 @@ gsm_manager_init (GsmManager *manager)
                                       NULL, NULL);
 
         manager->priv->system = gsm_get_system ();
-        g_signal_connect (manager->priv->system, "notify::active",
-                          G_CALLBACK (on_gsm_system_active_changed), manager);
-
         manager->priv->shell = gsm_get_shell ();
         manager->priv->end_session_cancellable = g_cancellable_new ();
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]