[Xfce4-commits] <xfce4-panel:andrzejr/deskbar> tasklist-widget: fixed a bug in resetting the child->type field.
Andrzej
noreply at xfce.org
Mon Dec 26 23:50:03 CET 2011
Updating branch refs/heads/andrzejr/deskbar
to 64c6f7ca377a2f830d6ac069bcd67fc3a649723b (commit)
from a2fb4fd6a7b6744b274048b1f9bb02433136d765 (commit)
commit 64c6f7ca377a2f830d6ac069bcd67fc3a649723b
Author: Andrzej <ndrwrdck at gmail.com>
Date: Tue Dec 27 06:55:35 2011 +0900
tasklist-widget: 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 | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/plugins/tasklist/tasklist-widget.c b/plugins/tasklist/tasklist-widget.c
index 117a83e..7be4db4 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 */
@@ -861,14 +870,8 @@ 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);
- /* unset overflow items, we decide about that again
- * later */
- if (child->type == CHILD_TYPE_OVERFLOW_MENU)
- child->type = CHILD_TYPE_WINDOW;
- }
+ windows_scored = g_slist_insert_sorted (windows_scored, child,
+ xfce_tasklist_size_sort_window);
}
if (xfce_tasklist_deskbar (tasklist) || !tasklist->show_labels)
More information about the Xfce4-commits
mailing list