summaryrefslogtreecommitdiff
path: root/openbox/startupnotify.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2008-01-27 03:48:49 -0500
committerDana Jansens <danakj@orodu.net>2008-01-27 04:25:09 -0500
commita4d13100e67791955eef10876c6784748aff2fed (patch)
tree731ef5b6f5cd04f2ed42669447b0e246986e6120 /openbox/startupnotify.c
parent9a93350aa7bb124e39378eb0d67b7e0ca1a8a1df (diff)
use setenv/unsetenv instead of putenv, cuz they are not ugly and confusing wrt memory leaks
Diffstat (limited to 'openbox/startupnotify.c')
-rw-r--r--openbox/startupnotify.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/openbox/startupnotify.c b/openbox/startupnotify.c
index e9bb8310..e13aa55c 100644
--- a/openbox/startupnotify.c
+++ b/openbox/startupnotify.c
@@ -21,7 +21,9 @@
#include "gettext.h"
#include "event.h"
-#include <stdlib.h>
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
#ifndef USE_LIBSN
@@ -264,7 +266,7 @@ void sn_setup_spawn_environment(const gchar *program, const gchar *name,
g_direct_equal,
(GDestroyNotify)sn_launcher_context_unref);
- putenv(g_strdup_printf("DESKTOP_STARTUP_ID=%s", id));
+ setenv("DESKTOP_STARTUP_ID", id, TRUE);
g_free(desc);
}