From b77a03a1f22e3e474c1338416ec30681c6216b0d Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 20 Jan 2008 18:34:26 -0500 Subject: only unset the startup_desktop_id once, and dont free the string we pass to putenv --- openbox/openbox.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'openbox/openbox.c') 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) -- cgit v1.2.3 From 6be65a7ddd453bded890a90bb5c0b84b2a89c65a Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 27 Jan 2008 02:53:26 -0500 Subject: we alloc theme elements for every window frame, but really it is unneccesary --- openbox/openbox.c | 1 + 1 file changed, 1 insertion(+) (limited to 'openbox/openbox.c') diff --git a/openbox/openbox.c b/openbox/openbox.c index 0c74b255..d1841437 100644 --- a/openbox/openbox.c +++ b/openbox/openbox.c @@ -36,6 +36,7 @@ #include "focus_cycle_popup.h" #include "moveresize.h" #include "frame.h" +#include "framerender.h" #include "keyboard.h" #include "mouse.h" #include "extensions.h" -- cgit v1.2.3 From a4d13100e67791955eef10876c6784748aff2fed Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 27 Jan 2008 03:48:49 -0500 Subject: use setenv/unsetenv instead of putenv, cuz they are not ugly and confusing wrt memory leaks --- openbox/openbox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'openbox/openbox.c') diff --git a/openbox/openbox.c b/openbox/openbox.c index d1841437..18c34d2f 100644 --- a/openbox/openbox.c +++ b/openbox/openbox.c @@ -194,7 +194,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. */ - putenv(g_strdup_printf("DISPLAY=%s", DisplayString(ob_display))); + setenv("DISPLAY", DisplayString(ob_display), TRUE); /* create available cursors */ cursors[OB_CURSOR_NONE] = None; @@ -516,7 +516,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 */ - putenv(g_strdup("DESKTOP_STARTUP_ID")); + unsetenv("DESKTOP_STARTUP_ID"); } static void parse_args(gint *argc, gchar **argv) -- cgit v1.2.3