only unset the startup_desktop_id once, and dont free the string we pass to putenv

This commit is contained in:
Dana Jansens 2008-01-20 18:34:26 -05:00
parent 6a8a8531ba
commit b77a03a1f2
2 changed files with 1 additions and 10 deletions

View file

@ -515,9 +515,7 @@ static void remove_args(gint *argc, gchar **argv, gint index, gint num)
static void parse_env()
{
/* unset this so we don't pass it on unknowingly */
gchar *s = g_strdup("DESKTOP_STARTUP_ID");
putenv(s);
g_free(s);
putenv(g_strdup("DESKTOP_STARTUP_ID"));
}
static void parse_args(gint *argc, gchar **argv)

View file

@ -58,15 +58,8 @@ static void sn_event_func(SnMonitorEvent *event, gpointer data);
void sn_startup(gboolean reconfig)
{
gchar *s;
if (reconfig) return;
/* unset this so we don't pass it on unknowingly */
s = g_strdup("DESKTOP_STARTUP_ID");
putenv(s);
g_free(s);
sn_display = sn_display_new(ob_display, NULL, NULL);
sn_context = sn_monitor_context_new(sn_display, ob_screen,
sn_event_func, NULL, NULL);