]> Dogcows Code - chaz/tint2/commitdiff
cleanup
authorThierry Lorthiois <lorthiois@bbsoft.fr>
Sat, 23 Oct 2010 11:46:47 +0000 (11:46 +0000)
committerThierry Lorthiois <lorthiois@bbsoft.fr>
Sat, 23 Oct 2010 11:46:47 +0000 (11:46 +0000)
src/taskbar/taskbar.c
src/taskbar/taskbar.h

index 89267f6e591fcc55d5cccfc39f37ac8fae0ee519..3b61e22e72264c389bf424fc08f69a1e023510a5 100644 (file)
@@ -60,13 +60,16 @@ void cleanup_taskbar()
 {
        Panel *panel;
        Taskbar *tskbar;
-       int i, j;
+       int i, j, k;
 
        if (win_to_task_table) g_hash_table_foreach(win_to_task_table, taskbar_remove_task, 0);
        for (i=0 ; i < nb_panel ; i++) {
                panel = &panel1[i];
                for (j=0 ; j < panel->nb_desktop ; j++) {
                        tskbar = &panel->taskbar[j];
+                       for (k=0; k<TASKBAR_STATE_COUNT; ++k) {
+                               if (tskbar->state_pix[k]) XFreePixmap(server.dsp, tskbar->state_pix[k]);
+                       }
                        free_area (&tskbar->area);
                        // remove taskbar from the panel
                        panel->area.list = g_slist_remove(panel->area.list, tskbar);
index 72f0cca5134f76f179c216693b774fb2bfc2d45c..9944f15ceec7a833f8c490288152eb268c9ad6e3 100644 (file)
@@ -22,7 +22,6 @@ typedef struct {
        Area area;
 
        int desktop;
-       int current_state;
        Pixmap state_pix[TASKBAR_STATE_COUNT];
 
        // task parameters
@@ -34,8 +33,6 @@ typedef struct {
        //always start with area
        Area area;
        Background* background[TASKBAR_STATE_COUNT];
-       //Background* bg;
-       //Background* bg_active;
 } Global_taskbar;
 
 
This page took 0.028367 seconds and 4 git commands to generate.