[Xfce4-commits] [apps/xfdashboard] 03/05: Do not restart application via session management when it crashed but was started as force new instance (via environment variable XFDASHBOARD_FORCE_NEW_INSTANCE which is used for debugging purposes).

noreply at xfce.org noreply at xfce.org
Tue Aug 2 09:03:09 CEST 2016


This is an automated email from the git hooks/post-receive script.

nomad pushed a commit to branch master
in repository apps/xfdashboard.

commit 4096082587582c7d048e42066377ec5c4df25b77
Author: Stephan Haller <nomad at froevel.de>
Date:   Fri Jul 29 09:31:00 2016 +0200

    Do not restart application via session management when it crashed but was started as force new instance (via environment variable XFDASHBOARD_FORCE_NEW_INSTANCE which is used for debugging purposes).
---
 libxfdashboard/application.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libxfdashboard/application.c b/libxfdashboard/application.c
index 69e3b90..b90d000 100644
--- a/libxfdashboard/application.c
+++ b/libxfdashboard/application.c
@@ -342,6 +342,7 @@ static gboolean _xfdashboard_application_initialize_full(XfdashboardApplication
 #if !GARCON_CHECK_VERSION(0,3,0)
 	const gchar						*desktop;
 #endif
+	XfceSMClientRestartStyle		sessionManagementRestartStyle;
 
 	g_return_val_if_fail(XFDASHBOARD_IS_APPLICATION(self), FALSE);
 
@@ -369,9 +370,12 @@ static gboolean _xfdashboard_application_initialize_full(XfdashboardApplication
 #endif
 
 	/* Setup the session management */
+	sessionManagementRestartStyle=XFCE_SM_CLIENT_RESTART_IMMEDIATELY;
+	if(g_getenv("XFDASHBOARD_FORCE_NEW_INSTANCE")) sessionManagementRestartStyle=XFCE_SM_CLIENT_RESTART_NORMAL;
+
 	priv->sessionManagementClient=xfce_sm_client_get();
 	xfce_sm_client_set_priority(priv->sessionManagementClient, XFCE_SM_CLIENT_PRIORITY_DEFAULT);
-	xfce_sm_client_set_restart_style(priv->sessionManagementClient, XFCE_SM_CLIENT_RESTART_IMMEDIATELY);
+	xfce_sm_client_set_restart_style(priv->sessionManagementClient, sessionManagementRestartStyle);
 	g_signal_connect_swapped(priv->sessionManagementClient, "quit", G_CALLBACK(_xfdashboard_application_on_session_quit), self);
 
 	if(!xfce_sm_client_connect(priv->sessionManagementClient, &error))

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list