all repos — tint2 @ bab686d8c46f17cf4a1bf55939e576458c344481

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

Corrected memory leak introduced with r690


git-svn-id: http://tint2.googlecode.com/svn/trunk@691 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
google@craigoakes.com google@craigoakes.com@121b4492-b84c-0410-8b4c-0d4edfb3f3cc
commit

bab686d8c46f17cf4a1bf55939e576458c344481

parent

51fe905b47f64162cbcee133d7b0cb6c7dd7c12c

2 files changed, 7 insertions(+), 3 deletions(-)

jump to
M src/config.csrc/config.c

@@ -288,8 +288,10 @@ else if (strcmp (key, "disable_transparency") == 0) {

server.disable_transparency = atoi (value); } else if (strcmp (key, "panel_window_name") == 0) { - if (strlen(value) > 0) + if (strlen(value) > 0) { + free(panel_window_name); panel_window_name = strdup (value); + } } /* Battery */
M src/panel.csrc/panel.c

@@ -53,7 +53,7 @@ int panel_position;

int panel_horizontal; int panel_refresh; int task_dragged; -char *panel_window_name; +char *panel_window_name = NULL; int panel_autohide; int panel_autohide_show_timeout;

@@ -90,7 +90,8 @@ panel_autohide_height = 5; // for vertical panels this is of course the width

panel_strut_policy = STRUT_FOLLOW_SIZE; panel_dock = 0; // default not in the dock panel_layer = BOTTOM_LAYER; // default is bottom layer - panel_window_name = "tint2"; + free(panel_window_name); + panel_window_name = strdup("tint2"); wm_menu = 0; max_tick_urgent = 14; mouse_left = TOGGLE_ICONIFY;

@@ -124,6 +125,7 @@ if (p->main_win) XDestroyWindow(server.dsp, p->main_win);

} if (panel_items_order) g_free(panel_items_order); + free(panel_window_name); if (panel1) free(panel1); if (backgrounds) g_array_free(backgrounds, 1);