diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-03-28 06:00:19 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-03-28 06:00:19 +0000 |
| commit | f746a4975b1ab7559da3d9db51af14e1c084bc13 (patch) | |
| tree | 36823c0b8cde588e5a232ab05b948814ae6e3bb5 /openbox/action.c | |
| parent | 3ad050f7d8050a46ad03f8233f1c61ad40be9551 (diff) | |
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.
Diffstat (limited to 'openbox/action.c')
| -rw-r--r-- | openbox/action.c | 20 |
1 files changed, 10 insertions, 10 deletions
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 { |
