From f746a4975b1ab7559da3d9db51af14e1c084bc13 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 28 Mar 2007 06:00:19 +0000 Subject: use setenv to set up the DESKTOP_STARTUP_ID when launching programs. before, if DESKTOP_STARTUP_ID was set in openbox, it would mess up adding it to the child's environment because it would appear twice. so now it will only appear once for the child always. --- openbox/action.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'openbox/action.c') diff --git a/openbox/action.c b/openbox/action.c index 796f259a..9022333a 100644 --- a/openbox/action.c +++ b/openbox/action.c @@ -1103,17 +1103,18 @@ void action_execute(union ActionData *data) cmd, e->message); g_error_free(e); } else if (data->execute.startupnotify) { - gchar **env, *program; + gchar *program; program = g_path_get_basename(argv[0]); - env = sn_get_spawn_environment(program, - data->execute.name, - data->execute.icon_name, - /* launch it on the current - desktop */ - screen_desktop, - data->execute.any.time); - if (!g_spawn_async(NULL, argv, env, G_SPAWN_SEARCH_PATH | + /* sets up the environment */ + sn_setup_spawn_environment(program, + data->execute.name, + data->execute.icon_name, + /* launch it on the current + desktop */ + screen_desktop, + data->execute.any.time); + if (!g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, NULL, &e)) { g_warning("failed to execute '%s': %s", @@ -1121,7 +1122,6 @@ void action_execute(union ActionData *data) g_error_free(e); sn_spawn_cancel(); } - g_strfreev(env); g_free(program); g_strfreev(argv); } else { -- cgit v1.2.3