]> Dogcows Code - chaz/tint2/blobdiff - src/taskbar/task.c
fixed memory leak
[chaz/tint2] / src / taskbar / task.c
index 4115cbe6d84baaa2f52370e8278be111a8ef16ef..960b53bfd85cd9fad1b5348eb610febbb38d7eb3 100644 (file)
@@ -65,14 +65,15 @@ void add_task (Window win)
          new_tsk->title = 0;
       }
       if (new_tsk->icon_data) {
-         XFree (new_tsk->icon_data);
+         free (new_tsk->icon_data);
          new_tsk->icon_data = 0;
       }
       free(new_tsk);
       fprintf(stderr, "task on all desktop : ignored\n");
       return;
    }
-   
+      
+   //printf("add_task %d  %s\n", index(desktop, monitor), new_tsk->title);
    Taskbar *tskbar;
    tskbar = &panel.taskbar[index(desktop, monitor)];     
    new_tsk->area.parent = tskbar;
@@ -92,13 +93,14 @@ void remove_task (Task *tsk)
    tskbar->area.list = g_slist_remove(tskbar->area.list, tsk);
    resize_tasks (tskbar);
    redraw (&tskbar->area);
+   //printf("remove_task %d  %s\n", index(tskbar->desktop, tskbar->monitor), tsk->title);
 
    if (tsk->title) {
       free (tsk->title);
       tsk->title = 0;
    }
    if (tsk->icon_data) {
-      XFree (tsk->icon_data);
+      free (tsk->icon_data);
       tsk->icon_data = 0;
    }
    XFreePixmap (server.dsp, tsk->area.pmap);
This page took 0.024177 seconds and 4 git commands to generate.