X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Fopenbox.c;h=c41eea4ded54134d3649ef7b0cbe519b49bd1509;hb=6ad5f085fa5a38ab8373769cac5cd52839d0a7a5;hp=9fd5fe40b451a188249ba6ca6af7416b2321e1df;hpb=5d5714f01e1a7140847f6e7f2922d457f6bbe66a;p=chaz%2Fopenbox diff --git a/openbox/openbox.c b/openbox/openbox.c index 9fd5fe40..c41eea4d 100644 --- a/openbox/openbox.c +++ b/openbox/openbox.c @@ -196,7 +196,7 @@ gint main(gint argc, gchar **argv) /* set the DISPLAY environment variable for any lauched children, to the display we're using, so they open in the right place. */ - setenv("DISPLAY", DisplayString(obt_display), TRUE); + g_setenv("DISPLAY", DisplayString(obt_display), TRUE); /* create available cursors */ cursors[OB_CURSOR_NONE] = None; @@ -355,11 +355,11 @@ gint main(gint argc, gchar **argv) } } - reconfigure = FALSE; - ob_set_state(OB_STATE_RUNNING); - if (startup_cmd) run_startup_cmd(); + if (!reconfigure && startup_cmd) run_startup_cmd(); + + reconfigure = FALSE; /* look for parsing errors */ { @@ -589,12 +589,12 @@ static void parse_env(void) const gchar *id; /* unset this so we don't pass it on unknowingly */ - unsetenv("DESKTOP_STARTUP_ID"); + g_unsetenv("DESKTOP_STARTUP_ID"); /* this is how gnome-session passes in a session client id */ id = g_getenv("DESKTOP_AUTOSTART_ID"); if (id) { - unsetenv("DESKTOP_AUTOSTART_ID"); + g_unsetenv("DESKTOP_AUTOSTART_ID"); if (ob_sm_id) g_free(ob_sm_id); ob_sm_id = g_strdup(id); ob_debug_type(OB_DEBUG_SM,