diff options
author | Lucas Rocha <lucasr@gnome.org> | 2007-11-18 23:48:23 +0000 |
---|---|---|
committer | Lucas Almeida Rocha <lucasr@src.gnome.org> | 2007-11-18 23:48:23 +0000 |
commit | 20d599819b32d9c8bda1cad468664e6c1ff0a902 (patch) | |
tree | d3ef40433bd46bd783246f121fd593ce6d1a147b | |
parent | a8583668eb9bb40e2459c1ede07cf6b4f829022f (diff) | |
download | metacity-20d599819b32d9c8bda1cad468664e6c1ff0a902.tar.gz |
try to get the session client ID from DESKTOP_AUTOSTART_ID environment
2007-11-19 Lucas Rocha <lucasr@gnome.org>
* src/main.c (main): try to get the session client ID from
DESKTOP_AUTOSTART_ID environment variable in case the --sm-client-id
is not used. Closes #498033.
svn path=/trunk/; revision=3415
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/main.c | 17 |
2 files changed, 22 insertions, 1 deletions
@@ -1,3 +1,9 @@ +2007-11-19 Lucas Rocha <lucasr@gnome.org> + + * src/main.c (main): try to get the session client ID from + DESKTOP_AUTOSTART_ID environment variable in case the --sm-client-id + is not used. Closes #498033. + 2007-11-17 Thomas Thurman <thomas@thurman.org.uk> * configure.in: Post-release bump to 2.21.3. @@ -382,8 +382,23 @@ main (int argc, char **argv) * info */ if (!meta_args.disable_sm) - meta_session_init (meta_args.client_id, meta_args.save_file); + { + if (meta_args.client_id == NULL) + { + const gchar *desktop_autostart_id; + + desktop_autostart_id = g_getenv ("DESKTOP_AUTOSTART_ID"); + + if (desktop_autostart_id != NULL) + meta_args.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"); + meta_session_init (meta_args.client_id, meta_args.save_file); + } /* Free memory possibly allocated by the argument parsing which are * no longer needed. */ |