diff --git a/ChangeLog b/ChangeLog index aff06a3..d06bbdf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2008-11-12 +- fixed segfault with icon - panel's left and right padding feel like WM background (right click open window managers's menu, ...) diff --git a/src/taskbar/task.c b/src/taskbar/task.c index 3c4e6ed..4115cbe 100644 --- a/src/taskbar/task.c +++ b/src/taskbar/task.c @@ -60,8 +60,14 @@ void add_task (Window win) XSelectInput (server.dsp, new_tsk->win, PropertyChangeMask|StructureNotifyMask); if (desktop == 0xFFFFFFFF) { - if (new_tsk->title) XFree (new_tsk->title); - if (new_tsk->icon_data) XFree (new_tsk->icon_data); + if (new_tsk->title) { + free (new_tsk->title); + new_tsk->title = 0; + } + if (new_tsk->icon_data) { + XFree (new_tsk->icon_data); + new_tsk->icon_data = 0; + } free(new_tsk); fprintf(stderr, "task on all desktop : ignored\n"); return; @@ -87,8 +93,14 @@ void remove_task (Task *tsk) resize_tasks (tskbar); redraw (&tskbar->area); - if (tsk->title) XFree (tsk->title); - if (tsk->icon_data) XFree (tsk->icon_data); + if (tsk->title) { + free (tsk->title); + tsk->title = 0; + } + if (tsk->icon_data) { + XFree (tsk->icon_data); + tsk->icon_data = 0; + } XFreePixmap (server.dsp, tsk->area.pmap); XFreePixmap (server.dsp, tsk->area_active.pmap); free(tsk); @@ -101,8 +113,6 @@ void get_title(Task *tsk) char *title, *name; - if (tsk->title) free(tsk->title); - name = server_get_property (tsk->win, server.atom._NET_WM_VISIBLE_NAME, server.atom.UTF8_STRING, 0); if (!name || !strlen(name)) { name = server_get_property (tsk->win, server.atom._NET_WM_NAME, server.atom.UTF8_STRING, 0); @@ -116,12 +126,14 @@ void get_title(Task *tsk) } // add space before title - title = malloc(strlen(name)+1); + title = malloc(strlen(name)+2); if (g_task.icon) strcpy(title, " "); else title[0] = 0; strcat(title, name); - if (name) XFree (name); + + if (tsk->title) + free(tsk->title); tsk->title = title; } diff --git a/src/tint2 b/src/tint2 index fcc2f2d..04154da 100755 Binary files a/src/tint2 and b/src/tint2 differ diff --git a/tintrc06 b/tintrc06 index 741bb8b..9cc94bb 100644 --- a/tintrc06 +++ b/tintrc06 @@ -11,9 +11,14 @@ background_color = #000000 45 border_color = #ffffff 0 rounded = 7 -border_width = 1 -background_color = #ffffff 0 -border_color = #ffffff 70 +border_width = 0 +background_color = #ffffff 20 +border_color = #ffffff 15 + +rounded = 0 +border_width = 0 +background_color = #000000 35 +border_color = #ffffff 0 #--------------------------------------------- @@ -21,7 +26,7 @@ border_color = #ffffff 70 #--------------------------------------------- panel_monitor = 1 panel_position = bottom left -panel_size = 1010 30 +panel_size = 0 30 panel_margin = 0 0 panel_padding = 11 2 font_shadow = 0 @@ -44,7 +49,7 @@ task_centered = 1 task_padding = 2 2 task_font = sans bold 8 task_font_color = #ffffff 60 -task_active_font_color = #ffffff 95 +task_active_font_color = #ffffff 85 task_background_id = 0 task_active_background_id = 2