all repos — tint2 @ 97001249b59c82200d96fabef7734482f1b594a1

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

*fix* segfault when cycling through tasks and taskbarname is enabled

git-svn-id: http://tint2.googlecode.com/svn/trunk@628 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
o9000 o9000
commit

97001249b59c82200d96fabef7734482f1b594a1

parent

25d15551504a89ec23d3db4a9bab64d2fb682845

1 files changed, 6 insertions(+), 4 deletions(-)

jump to
M src/taskbar/task.csrc/taskbar/task.c

@@ -411,16 +411,17 @@ {

if (tsk == 0) return 0; - GSList *l0; + 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 = tskbar->area.list; + if (l0->next == 0) l0 = lfirst_tsk; else l0 = l0->next; return l0->data; }

@@ -434,17 +435,18 @@ {

if (tsk == 0) return 0; - GSList *l0; + 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 == tskbar->area.list) { + if (l0 == lfirst_tsk) { l0 = g_slist_last ( l0 ); tsk2 = l0->data; }