all repos — tint2 @ 5b3edd677709906239ad0511254bb84ca9b5ab01

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

cleanup

git-svn-id: http://tint2.googlecode.com/svn/trunk@174 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
lorthiois@bbsoft.fr lorthiois@bbsoft.fr@121b4492-b84c-0410-8b4c-0d4edfb3f3cc
commit

5b3edd677709906239ad0511254bb84ca9b5ab01

parent

3082da0f5c093b3318f202c05a30045425436124

2 files changed, 12 insertions(+), 9 deletions(-)

jump to
M src/panel.hsrc/panel.h

@@ -81,6 +81,8 @@

// -------------------------------------------------- // taskbar point to the first taskbar in panel.area.list. // number of tasbar == nb_desktop + // taskbar[i] is used to loop over taskbar, + // while panel->area.list is used to loop over all panel's objects Taskbar *taskbar; int nb_desktop;
M src/tint.csrc/tint.c

@@ -134,25 +134,26 @@

Taskbar *click_taskbar (Panel *panel, int x, int y) { - GSList *l0; - Taskbar *tskbar = NULL; + Taskbar *tskbar; + int i; + if (panel_horizontal) { - for (l0 = panel->area.list; l0 ; l0 = l0->next) { - tskbar = l0->data; + for (i=0; i < panel->nb_desktop ; i++) { + tskbar = &panel->taskbar[i]; if (!tskbar->area.on_screen) continue; if (x >= tskbar->area.posx && x <= (tskbar->area.posx + tskbar->area.width)) - break; + return tskbar; } } else { - for (l0 = panel->area.list; l0 ; l0 = l0->next) { - tskbar = l0->data; + for (i=0; i < panel->nb_desktop ; i++) { + tskbar = &panel->taskbar[i]; if (!tskbar->area.on_screen) continue; if (y >= tskbar->area.posy && y <= (tskbar->area.posy + tskbar->area.height)) - break; + return tskbar; } } - return tskbar; + return NULL; }