]> Dogcows Code - chaz/tint2/blobdiff - src/panel.c
memorized taskbar pixmap. So we don t redraw taskbar/task when switching desktop.
[chaz/tint2] / src / panel.c
index f5eaf9a16277bf299ba98dab0e05e2120544defc..3971bc8021564bd182f5ddea39db7eb9c85dc06c 100644 (file)
@@ -303,11 +303,11 @@ void init_panel_size_and_position(Panel *panel)
 
 
 int resize_panel(void *obj)
-{      
+{
        resize_by_layout(obj, 0);
        
        //printf("resize_panel\n");
-       if (panel_mode != MULTI_DESKTOP) {
+       if (panel_mode != MULTI_DESKTOP && taskbar_enabled) {
                // propagate width/height on hidden taskbar
                int i, width, height;
                Panel *panel = (Panel*)obj;
@@ -530,11 +530,16 @@ void set_panel_background(Panel *p)
                set_redraw(a);
        }
        
-       // reset task 'state_pix'
-       int i;
+       // reset task/taskbar 'state_pix'
+       int i, k;
        Taskbar *tskbar;
        for (i=0 ; i < p->nb_desktop ; i++) {
                tskbar = &p->taskbar[i];
+               for (k=0; k<TASKBAR_STATE_COUNT; ++k) {
+                       if (tskbar->state_pix[k]) XFreePixmap(server.dsp, tskbar->state_pix[k]);
+                       tskbar->state_pix[k] = 0;
+               }
+               tskbar->area.pix = 0;
                for (l0 = tskbar->area.list; l0 ; l0 = l0->next) {
                        set_task_redraw((Task *)l0->data);
                }
This page took 0.02109 seconds and 4 git commands to generate.