From 3de211e4219f2900ec4d1814d5a4bfed5af1f1a3 Mon Sep 17 00:00:00 2001 From: Thierry Lorthiois Date: Fri, 16 Oct 2009 19:38:43 +0000 Subject: [PATCH] start task on another monitor --- src/taskbar/task.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/taskbar/task.c b/src/taskbar/task.c index 6fce7e6..39dfd64 100644 --- a/src/taskbar/task.c +++ b/src/taskbar/task.c @@ -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 -- 2.45.2