From b77a03a1f22e3e474c1338416ec30681c6216b0d Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 20 Jan 2008 18:34:26 -0500 Subject: [PATCH] only unset the startup_desktop_id once, and dont free the string we pass to putenv --- openbox/openbox.c | 4 +--- openbox/startupnotify.c | 7 ------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/openbox/openbox.c b/openbox/openbox.c index 48f31f91..0c74b255 100644 --- a/openbox/openbox.c +++ b/openbox/openbox.c @@ -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) diff --git a/openbox/startupnotify.c b/openbox/startupnotify.c index 8bc38da2..78a1e94a 100644 --- a/openbox/startupnotify.c +++ b/openbox/startupnotify.c @@ -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); -- 2.39.2