[Xfce4-commits] <xfce4-panel:master> Tasklist: Work around segfaulting of group buttons.
Nick Schermer
noreply at xfce.org
Wed Apr 6 19:04:01 CEST 2011
Updating branch refs/heads/master
to 3fb2ce0cb430a12c95f43055ec142e21ecac54f5 (commit)
from fb48ad974dfca6a2bc00abf4d065b39b12828be6 (commit)
commit 3fb2ce0cb430a12c95f43055ec142e21ecac54f5
Author: Nick Schermer <nick at xfce.org>
Date: Wed Apr 6 19:00:44 2011 +0200
Tasklist: Work around segfaulting of group buttons.
Some counting goes wrong. This is not a definitive fix, but it
prevents the crashes when the tasklist runs in group-button mode.
plugins/tasklist/tasklist-widget.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/plugins/tasklist/tasklist-widget.c b/plugins/tasklist/tasklist-widget.c
index 9d63815..6ca82e6 100644
--- a/plugins/tasklist/tasklist-widget.c
+++ b/plugins/tasklist/tasklist-widget.c
@@ -911,7 +911,9 @@ xfce_tasklist_size_layout (XfceTasklist *tasklist,
lp = lp->next, n_buttons--)
{
child = lp->data;
- child->type = CHILD_TYPE_OVERFLOW_MENU;
+
+ if (child->type == CHILD_TYPE_WINDOW)
+ child->type = CHILD_TYPE_OVERFLOW_MENU;
}
*arrow_visible = TRUE;
@@ -1018,6 +1020,10 @@ xfce_tasklist_size_allocate (GtkWidget *widget,
if (tasklist->show_labels)
{
+ /* TODO, this is a work-around, something else goes wrong
+ * with counting the windows... */
+ if (cols < 1)
+ cols = 1;
w = area_width / cols--;
if (tasklist->max_button_length > 0
&& w > tasklist->max_button_length)
More information about the Xfce4-commits
mailing list