[Xfce4-commits] <xfce4-panel:master> Tasklist: Fixed a bug in resetting the child->type field.

Nick Schermer noreply at xfce.org
Fri Dec 30 20:46:01 CET 2011


Updating branch refs/heads/master
         to f867ceb4b54d411d3a6c926c0db0f3f506905605 (commit)
       from bbf484ea71dfd1b97a8716739c698ed2bb9348ac (commit)

commit f867ceb4b54d411d3a6c926c0db0f3f506905605
Author: Andrzej <ndrwrdck at gmail.com>
Date:   Fri Dec 30 20:28:15 2011 +0100

    Tasklist: Fixed a bug in resetting the child->type field.
    
    In the previous version the field wasn't always reset
    (for example after shrinking and growing the panel several
    times), which resulted in missing buttons.

 plugins/tasklist/tasklist-widget.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/plugins/tasklist/tasklist-widget.c b/plugins/tasklist/tasklist-widget.c
index 8172d01..4a38af7 100644
--- a/plugins/tasklist/tasklist-widget.c
+++ b/plugins/tasklist/tasklist-widget.c
@@ -846,6 +846,15 @@ xfce_tasklist_size_layout (XfceTasklist  *tasklist,
 
   *arrow_position = -1; /* not visible */
 
+  /* unset overflow items, we decide about that again
+   * later */
+  for (li = tasklist->windows; li != NULL; li = li->next)
+    {
+      child = li->data;
+      if (child->type == CHILD_TYPE_OVERFLOW_MENU)
+        child->type = CHILD_TYPE_WINDOW;
+    }
+
   if (min_button_length * cols <= alloc->width)
     {
       /* all the windows seem to fit */
@@ -864,10 +873,6 @@ xfce_tasklist_size_layout (XfceTasklist  *tasklist,
             {
               windows_scored = g_slist_insert_sorted (windows_scored, child,
                                                       xfce_tasklist_size_sort_window);
-              /* unset overflow items, we decide about that again
-               * later */
-              if (child->type == CHILD_TYPE_OVERFLOW_MENU)
-                child->type = CHILD_TYPE_WINDOW;
             }
         }
 


More information about the Xfce4-commits mailing list