--- libxfcegui4-4.0.1/libxfcegui4/netk-tasklist.c.conv_look	2003-08-04 01:41:19 +0400
+++ libxfcegui4-4.0.1/libxfcegui4/netk-tasklist.c	2004-01-10 14:01:23 +0300
@@ -380,6 +380,8 @@
 
     tasklist->priv->minimum_width = DEFAULT_WIDTH;
     tasklist->priv->minimum_height = DEFAULT_HEIGHT;
+    
+    tasklist->priv->max_button_width = 1; /* max_button_width == 1 will tell us that we haven't had any size requests before -- A.V. */
 
     tasklist->priv->idle_callback_tag = 0;
 }
@@ -704,8 +706,9 @@
     GtkRequisition child_req;
     GtkAllocation fake_allocation;
     int max_height = 1;
-    int max_width = 1;
-    /* int u_width, u_height; */
+    int max_width = 220; /* This makes four task buttons on 1024x768 with the pager present and without tray icons.
+                            In truth, though, this doesn't matter anyway, because on (...)_size_allocate we'll know the actual 
+			    amount of space available and adjust max_button_width accordingly -- A.V. */
     GList *l;
     GArray *array;
     GList *ungrouped_apps;
@@ -730,7 +733,10 @@
         gtk_widget_size_request (task->button, &child_req);
 
         max_height = MAX (child_req.height, max_height);
-        max_width = MAX (child_req.width, max_width);
+	
+	/* We're going to set a fixed max_button_width, so I'm commenting out the next line -- A.V. */
+	
+        /* max_width = MAX (child_req.width, max_width); */
 
         l = l->next;
     }
@@ -743,12 +749,22 @@
         gtk_widget_size_request (task->button, &child_req);
 
         max_height = MAX (child_req.height, max_height);
-        max_width = MAX (child_req.width, max_width);
+        
+	/* See above -- A.V. */
+	
+	/* max_width = MAX (child_req.width, max_width); */
 
         l = l->next;
     }
+    
+    /* If this is our first ever size request, we assign max_button_width an initial value of max_width,
+       otherwise we leave it as it is -- A.V. */
 
-    tasklist->priv->max_button_width = max_width;
+    if (tasklist->priv->max_button_width <= 1) 
+    {
+    	tasklist->priv->max_button_width = max_width;
+    }
+    
     tasklist->priv->max_button_height = max_height;
 
 
@@ -900,6 +916,8 @@
 
     tasklist = NETK_TASKLIST (widget);
 
+    tasklist->priv->max_button_width = allocation->width / 4; /* We want minimum four buttons to completely fill the tasklist -- A.V. */
+
     n_windows = g_list_length (tasklist->priv->windows);
     n_grouped_buttons = 0;
     ungrouped_apps = g_list_copy (tasklist->priv->applications);
@@ -980,7 +998,7 @@
     i = 0;
     total_width = tasklist->priv->max_button_width * n_cols;
     total_width = MIN (total_width, allocation->width);
-    total_width = allocation->width;
+    /* total_width = allocation->width; */ /* Task buttons should not always grab all free taskbar space -- A.V. */
     while (l != NULL)
     {
         NetkTask *task = NETK_TASK (l->data);
