]> Dogcows Code - chaz/tint2/commitdiff
start task on another monitor
authorThierry Lorthiois <lorthiois@bbsoft.fr>
Fri, 16 Oct 2009 19:38:43 +0000 (19:38 +0000)
committerThierry Lorthiois <lorthiois@bbsoft.fr>
Fri, 16 Oct 2009 19:38:43 +0000 (19:38 +0000)
src/taskbar/task.c

index 6fce7e6bb50e41bd03b82199d0856da054ce5a17..39dfd642e248dd90efa3b3cc3b7092d16a250ea3 100644 (file)
@@ -43,10 +43,13 @@ Task *add_task (Window win)
 
        Task new_tsk;
        new_tsk.win = win;
-       new_tsk.area.panel = &panel1[0];
        new_tsk.desktop = window_get_desktop (win);
-       if (nb_panel > 1) monitor = window_get_monitor (win);
+       if (nb_panel > 1) {
+               monitor = window_get_monitor (win);
+               if (monitor >= nb_panel) monitor = 0;
+       }
        else monitor = 0;
+       new_tsk.area.panel = &panel1[monitor];
 
        // allocate only one title and one icon
        // even with task_on_all_desktop and with task_on_all_panel
This page took 0.027806 seconds and 4 git commands to generate.