- if (task_active) {
- for (i=0 ; i < nb_panel ; i++) {
- for (j=0 ; j < panel1[i].nb_desktop ; j++) {
- for (l0 = panel1[i].taskbar[j].area.list; l0 ; l0 = l0->next) {
- tsk1 = l0->data;
- tsk1->area.is_active = 0;
- }
+ long value[] = { panel->posx+tsk->area.posx, panel->posy+tsk->area.posy, tsk->area.width, tsk->area.height };
+ XChangeProperty (server.dsp, tsk->win, server.atom._NET_WM_ICON_GEOMETRY, XA_CARDINAL, 32, PropModeReplace, (unsigned char*)value, 4);
+
+ // reset Pixmap when position/size changed
+ set_task_redraw(tsk);
+}
+
+
+Task *next_task(Task *tsk)
+{
+ if (tsk == 0)
+ return 0;
+
+ GSList *l0, *lfirst_tsk;
+ Task *tsk1;
+ Taskbar* tskbar = tsk->area.parent;
+
+ l0 = tskbar->area.list;
+ if (taskbarname_enabled) l0 = l0->next;
+ lfirst_tsk = l0;
+ for (; l0 ; l0 = l0->next) {
+ tsk1 = l0->data;
+ if (tsk1 == tsk) {
+ if (l0->next == 0) l0 = lfirst_tsk;
+ else l0 = l0->next;
+ return l0->data;
+ }
+ }
+
+ return 0;
+}
+
+Task *prev_task(Task *tsk)
+{
+ if (tsk == 0)
+ return 0;
+
+ GSList *l0, *lfirst_tsk;
+ Task *tsk1, *tsk2;
+ Taskbar* tskbar = tsk->area.parent;
+
+ tsk2 = 0;
+ l0 = tskbar->area.list;
+ if (taskbarname_enabled) l0 = l0->next;
+ lfirst_tsk = l0;
+ for (; l0 ; l0 = l0->next) {
+ tsk1 = l0->data;
+ if (tsk1 == tsk) {
+ if (l0 == lfirst_tsk) {
+ l0 = g_slist_last ( l0 );
+ tsk2 = l0->data;