[Xfce4-commits] <xfce4-panel:devel> Release the session manager before all other objects.
Nick Schermer
noreply at xfce.org
Wed Oct 28 16:20:06 CET 2009
Updating branch refs/heads/devel
to 43a4e80c9e6f72bd226cbd53e74965bea1e220af (commit)
from 008dde15f09452c9e63549ca4fddebde3b048037 (commit)
commit 43a4e80c9e6f72bd226cbd53e74965bea1e220af
Author: Nick Schermer <nick at xfce.org>
Date: Wed Oct 28 14:49:13 2009 +0100
Release the session manager before all other objects.
If the other parts segfault during a normal quit, the
XFCE_SM_CLIENT_RESTART_NORMAL is never set, which results
in a panel that can not quit.
panel/main.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/panel/main.c b/panel/main.c
index 2b72b97..14eca38 100644
--- a/panel/main.c
+++ b/panel/main.c
@@ -253,6 +253,13 @@ main (gint argc, gchar **argv)
/* enter the main loop */
gtk_main ();
+ /* release session reference */
+ exit_style = panel_dbus_service_get_exit_style ();
+ if (exit_style == PANEL_DBUS_EXIT_QUIT
+ || exit_style == PANEL_DBUS_EXIT_RESTART)
+ xfce_sm_client_set_restart_style (sm_client, XFCE_SM_CLIENT_RESTART_NORMAL);
+ g_object_unref (G_OBJECT (sm_client));
+
/* release dbus service */
g_object_unref (G_OBJECT (dbus_service));
@@ -265,13 +272,6 @@ main (gint argc, gchar **argv)
/* release application reference */
g_object_unref (G_OBJECT (application));
- /* release session reference */
- exit_style = panel_dbus_service_get_exit_style ();
- if (exit_style == PANEL_DBUS_EXIT_QUIT
- || exit_style == PANEL_DBUS_EXIT_RESTART)
- xfce_sm_client_set_restart_style (sm_client, XFCE_SM_CLIENT_RESTART_NORMAL);
- g_object_unref (G_OBJECT (sm_client));
-
/* whether we need to restart */
if (exit_style == PANEL_DBUS_EXIT_RESTART)
{
More information about the Xfce4-commits
mailing list