summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2015-03-06 18:13:40 -0500
committerRay Strode <rstrode@redhat.com>2015-03-09 11:10:46 -0400
commitcd84c507fc692536562d3f1934d01f00612b6be8 (patch)
tree22ef0a26458e227a5ce3d12229dff6110dec1bed
parentcf408335c891b41824f2071ec8433490d735e399 (diff)
downloadgnome-session-cd84c507fc692536562d3f1934d01f00612b6be8.tar.gz
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
-rw-r--r--gnome-session/gsm-manager.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c
index 70ef94f8..46884750 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 ();
}