diff options
author | Ray Strode <rstrode@redhat.com> | 2014-03-17 15:55:47 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2014-03-17 16:11:34 -0400 |
commit | 236102c0e17a1b13328dd86f60cc0495ebd3d03b (patch) | |
tree | 439fcc6cdd7093356dcb127d817f886d959ea1a3 | |
parent | a283cbadd81b499ee438ee20e6c080f767cfdbef (diff) | |
download | gdm-236102c0e17a1b13328dd86f60cc0495ebd3d03b.tar.gz |
launch-environment: disconnect session signal handlers when destroyed
The launch environment's session can actually live longer than the
environment itself. This is because the session creates internals
"conversation" objects that take a reference on the session, which
sometimes keeps it on life support.
This commit makes sure the session signal handlers for the launch
environment don't get run after the launch environment is destroyed.
https://bugzilla.gnome.org/show_bug.cgi?id=726380
-rw-r--r-- | daemon/gdm-launch-environment.c | 63 |
1 files changed, 35 insertions, 28 deletions
diff --git a/daemon/gdm-launch-environment.c b/daemon/gdm-launch-environment.c index 89af3679..195bf592 100644 --- a/daemon/gdm-launch-environment.c +++ b/daemon/gdm-launch-environment.c @@ -470,34 +470,41 @@ gdm_launch_environment_start (GdmLaunchEnvironment *launch_environment) launch_environment->priv->x11_display_is_local, NULL); - g_signal_connect (launch_environment->priv->session, - "conversation-started", - G_CALLBACK (on_conversation_started), - launch_environment); - g_signal_connect (launch_environment->priv->session, - "conversation-stopped", - G_CALLBACK (on_conversation_stopped), - launch_environment); - g_signal_connect (launch_environment->priv->session, - "setup-complete", - G_CALLBACK (on_session_setup_complete), - launch_environment); - g_signal_connect (launch_environment->priv->session, - "session-opened", - G_CALLBACK (on_session_opened), - launch_environment); - g_signal_connect (launch_environment->priv->session, - "session-started", - G_CALLBACK (on_session_started), - launch_environment); - g_signal_connect (launch_environment->priv->session, - "session-exited", - G_CALLBACK (on_session_exited), - launch_environment); - g_signal_connect (launch_environment->priv->session, - "session-died", - G_CALLBACK (on_session_died), - launch_environment); + g_signal_connect_object (launch_environment->priv->session, + "conversation-started", + G_CALLBACK (on_conversation_started), + launch_environment, + 0); + g_signal_connect_object (launch_environment->priv->session, + "conversation-stopped", + G_CALLBACK (on_conversation_stopped), + launch_environment, + 0); + g_signal_connect_object (launch_environment->priv->session, + "setup-complete", + G_CALLBACK (on_session_setup_complete), + launch_environment, + 0); + g_signal_connect_object (launch_environment->priv->session, + "session-opened", + G_CALLBACK (on_session_opened), + launch_environment, + 0); + g_signal_connect_object (launch_environment->priv->session, + "session-started", + G_CALLBACK (on_session_started), + launch_environment, + 0); + g_signal_connect_object (launch_environment->priv->session, + "session-exited", + G_CALLBACK (on_session_exited), + launch_environment, + 0); + g_signal_connect_object (launch_environment->priv->session, + "session-died", + G_CALLBACK (on_session_died), + launch_environment, + 0); gdm_session_start_conversation (launch_environment->priv->session, "gdm-launch-environment"); |