[Xfce4-commits] <xfce4-panel:andrzejr/deskbar-tasklist> tasklist-widget: resetting types of child_allocs in the size_allocate (layout) procedure instead of size_request one.

Andrzej noreply at xfce.org
Mon Dec 12 19:48:01 CET 2011


Updating branch refs/heads/andrzejr/deskbar-tasklist
         to 60fa87d6dafedda1afb11f425a1055ca75b70d49 (commit)
       from 51b17f08a93fd7aaaa88beb9324fbd6dfa18b7cd (commit)

commit 60fa87d6dafedda1afb11f425a1055ca75b70d49
Author: Andrzej <ndrwrdck at gmail.com>
Date:   Tue Dec 13 03:44:14 2011 +0900

    tasklist-widget: resetting types of child_allocs in the size_allocate (layout) procedure instead of size_request one.
    
    Size_allocate can be called multiple times with different allocation sizes. Size_request should be called before each size_allocate but because of caching it does not always happen.
    There might be some other issue in the panel_itembar code causing multiple calls to size_allocate. It is not clear why this happens and why two consecutive calls to size_allocate have different allocation lengths even though the size of the panel hasn't changed.

 plugins/tasklist/tasklist-widget.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/plugins/tasklist/tasklist-widget.c b/plugins/tasklist/tasklist-widget.c
index 5ee7cad..2f31ba0 100644
--- a/plugins/tasklist/tasklist-widget.c
+++ b/plugins/tasklist/tasklist-widget.c
@@ -756,11 +756,6 @@ xfce_tasklist_size_request (GtkWidget      *widget,
           if (child->type == CHILD_TYPE_GROUP_MENU)
             continue;
 
-          /* unset overflow items, we decide about that again
-           * during allocation */
-          if (child->type == CHILD_TYPE_OVERFLOW_MENU)
-            child->type = CHILD_TYPE_WINDOW;
-
           n_windows++;
         }
     }
@@ -879,8 +874,14 @@ xfce_tasklist_size_layout (XfceTasklist  *tasklist,
         {
           child = li->data;
           if (GTK_WIDGET_VISIBLE (child->button))
-            windows_scored = g_slist_insert_sorted (windows_scored, child,
-                                                    xfce_tasklist_size_sort_window);
+            {
+              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;
+            }
         }
 
       if (xfce_tasklist_deskbar (tasklist) || !tasklist->show_labels)


More information about the Xfce4-commits mailing list