]> Dogcows Code - chaz/tint2/commitdiff
fixed multi_desktop switching
authorThierry Lorthiois <lorthiois@bbsoft.fr>
Sun, 24 Oct 2010 09:18:41 +0000 (09:18 +0000)
committerThierry Lorthiois <lorthiois@bbsoft.fr>
Sun, 24 Oct 2010 09:18:41 +0000 (09:18 +0000)
src/launcher/launcher.c
src/taskbar/taskbar.c
src/tint.c

index 73e6039eb7e4e57e5897222cf44320d48e83597d..54b6639f4b50be961427dc063e8ab95b5cbcde68 100644 (file)
@@ -783,7 +783,6 @@ char *icon_path(Launcher *launcher, const char *icon_name, int size)
                else
                        return NULL;
        }
-       //printf("nom %s, taille %d, path %s\n", launcherIcon->icon_name, launcherIcon->icon_size, new_icon_path);
 
        GSList *basenames = NULL;
        char *file_name = g_build_filename(g_get_home_dir(), ".icons", NULL);
index 3b61e22e72264c389bf424fc08f69a1e023510a5..87c7bd495dbf80d5e17c828155a69e140eb70e21 100644 (file)
@@ -303,11 +303,20 @@ void set_taskbar_state(Taskbar *tskbar, int state)
 {
        tskbar->area.bg = panel1[0].g_taskbar.background[state];
        tskbar->area.pix = tskbar->state_pix[state];
-       if (tskbar->state_pix[state] == 0) {
-               tskbar->area.redraw = 1;
-               GSList *l;
-               for (l = tskbar->area.list ; l ; l = l->next)
-                       ((Area*)l->data)->redraw = 1;
+       if (panel_mode != MULTI_DESKTOP) { 
+               if (state == TASKBAR_NORMAL)
+                       tskbar->area.on_screen = 0;
+               else
+                       tskbar->area.on_screen = 1;
+       }
+       if (tskbar->area.on_screen == 1) {
+               if (tskbar->state_pix[state] == 0)
+                       tskbar->area.redraw = 1;
+               if (panel_mode == MULTI_DESKTOP && panel1[0].g_taskbar.background[TASKBAR_NORMAL] != panel1[0].g_taskbar.background[TASKBAR_ACTIVE]) {
+                       GSList *l;
+                       for (l = tskbar->area.list ; l ; l = l->next)
+                               set_task_redraw(l->data);
+               }
        }
        panel_refresh = 1;
 }
index cc12d44d963b4b67676834769df4a9f4da4180e0..47bce1b64e93b194e62ce8e1e25f82a08e2543ae 100644 (file)
@@ -538,8 +538,6 @@ void event_property_notify (XEvent *e)
                                                tskbar->area.resize = 1;
                                        }
                                }
-                               if (panel_mode != MULTI_DESKTOP) 
-                                       visible_taskbar(panel);
                        }
                }
                // Window list
This page took 0.026416 seconds and 4 git commands to generate.