X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Fstartupnotify.c;h=66bce264c13a68db853e53cacfbbb2e022bdd46b;hb=2c6240fd2f3e50fca76bb3f4df172eb745982b79;hp=1cf8da6fd9cd54c7d8579495432dcf87e47fb866;hpb=e2da61b2e7cbaace1f8799ec1fcd506c281892bf;p=chaz%2Fopenbox diff --git a/openbox/startupnotify.c b/openbox/startupnotify.c index 1cf8da6f..66bce264 100644 --- a/openbox/startupnotify.c +++ b/openbox/startupnotify.c @@ -58,10 +58,14 @@ 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 */ - unsetenv("DESKTOP_STARTUP_ID"); + 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, @@ -106,7 +110,7 @@ static SnStartupSequence* sequence_find(const gchar *id) return ret; } -gboolean sn_app_starting() +gboolean sn_app_starting(void) { return sn_waits != NULL; } @@ -259,12 +263,12 @@ void sn_setup_spawn_environment(gchar *program, gchar *name, g_direct_equal, (GDestroyNotify)sn_launcher_context_unref); - setenv("DESKTOP_STARTUP_ID", id, TRUE); + putenv(g_strdup_printf("DESKTOP_STARTUP_ID=%s", id)); g_free(desc); } -void sn_spawn_cancel() +void sn_spawn_cancel(void) { sn_launcher_context_complete(sn_launcher); }