libegg r901 - trunk/libegg/smclient



Author: danw
Date: Thu Oct  2 14:25:07 2008
New Revision: 901
URL: http://svn.gnome.org/viewvc/libegg?rev=901&view=rev

Log:
	* eggsmclient.c (sm_client_post_parse_func): copy
	DESKTOP_AUTOSTART_ID handling over from gnome-session's copy of
	eggsmclient

	* eggsmclient-libgnomeui.c:
	* eggsmclient-xsmp.c: remove some trailing commas


Modified:
   trunk/libegg/smclient/ChangeLog
   trunk/libegg/smclient/eggsmclient-libgnomeui.c
   trunk/libegg/smclient/eggsmclient-xsmp.c
   trunk/libegg/smclient/eggsmclient.c

Modified: trunk/libegg/smclient/eggsmclient-libgnomeui.c
==============================================================================
--- trunk/libegg/smclient/eggsmclient-libgnomeui.c	(original)
+++ trunk/libegg/smclient/eggsmclient-libgnomeui.c	Thu Oct  2 14:25:07 2008
@@ -107,7 +107,7 @@
 		NULL, /* init pass */
 		egg_sm_client_module_class_init,
 		NULL, /* opt prefix */
-		egg_sm_client_get_option_group,
+		egg_sm_client_get_option_group
 	};
 
 	return &module_info;

Modified: trunk/libegg/smclient/eggsmclient-xsmp.c
==============================================================================
--- trunk/libegg/smclient/eggsmclient-xsmp.c	(original)
+++ trunk/libegg/smclient/eggsmclient-xsmp.c	Thu Oct  2 14:25:07 2008
@@ -62,7 +62,7 @@
   XSMP_STATE_INTERACT,
   XSMP_STATE_SAVE_YOURSELF_DONE,
   XSMP_STATE_SHUTDOWN_CANCELLED,
-  XSMP_STATE_CONNECTION_CLOSED,
+  XSMP_STATE_CONNECTION_CLOSED
 } EggSMClientXSMPState;
 
 static const char *state_names[] = {

Modified: trunk/libegg/smclient/eggsmclient.c
==============================================================================
--- trunk/libegg/smclient/eggsmclient.c	(original)
+++ trunk/libegg/smclient/eggsmclient.c	Thu Oct  2 14:25:07 2008
@@ -204,6 +204,20 @@
 {
   EggSMClient *client = egg_sm_client_get ();
 
+  if (sm_client_id == NULL)
+    {
+      const gchar *desktop_autostart_id;
+
+      desktop_autostart_id = g_getenv ("DESKTOP_AUTOSTART_ID");
+
+      if (desktop_autostart_id != NULL)
+        sm_client_id = g_strdup (desktop_autostart_id);
+    }
+
+  /* Unset DESKTOP_AUTOSTART_ID in order to avoid child processes to
+   * use the same client id. */
+  g_unsetenv ("DESKTOP_AUTOSTART_ID");
+
   if (EGG_SM_CLIENT_GET_CLASS (client)->startup)
     EGG_SM_CLIENT_GET_CLASS (client)->startup (client, sm_client_id);
   return TRUE;



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