]> Dogcows Code - chaz/openbox/blobdiff - openbox/startupnotify.c
use setenv/unsetenv instead of putenv, cuz they are not ugly and confusing wrt memory...
[chaz/openbox] / openbox / startupnotify.c
index e9bb8310a0433989bac5254a8bbc07073a3e944d..e13aa55c688a55f84f50a66d6ebaa9392c389a34 100644 (file)
@@ -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);
 }
This page took 0.0252250000000001 seconds and 4 git commands to generate.