[Xfce4-commits] <xfce4-panel:xfce-4.8> Tasklist: Work around segfaulting of group buttons.

Nick Schermer noreply at xfce.org
Wed Apr 6 19:08:03 CEST 2011


Updating branch refs/heads/xfce-4.8
         to d139b244f1ab4331c553871f22e1789e197229c5 (commit)
       from b3d77e48f8c207bcb8bbf96907bf6448e4f3509d (commit)

commit d139b244f1ab4331c553871f22e1789e197229c5
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.
    
    (cherry picked from commit 3fb2ce0cb430a12c95f43055ec142e21ecac54f5)

 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