diff -r -u libwnck-2.6.0.1/libwnck/tasklist.c libwnck-2.6.0.1-new/libwnck/tasklist.c
--- libwnck-2.6.0.1/libwnck/tasklist.c	2004-10-18 21:37:33.918914463 -0400
+++ libwnck-2.6.0.1-new/libwnck/tasklist.c	2004-10-18 21:37:20.623505496 -0400
@@ -59,13 +59,17 @@
 #define MINI_ICON_SIZE 16
 #define DEFAULT_GROUPING_LIMIT 80
 
-#define DEFAULT_WIDTH 1
-#define DEFAULT_HEIGHT 48
+#define DEFAULT_WIDTH 1024
+#define DEFAULT_HEIGHT 24
 
 #define TIMEOUT_ACTIVATE 1000
 
 #define N_SCREEN_CONNECTIONS 5
 
+/* Benjamin Kahn: Give tasklets a hard max count. */
+#define BUTTON_MAX_HEIGHT 24
+#define BUTTON_MAX_WIDTH 250
+
 typedef enum
 {
   WNCK_TASK_CLASS_GROUP,
@@ -674,24 +679,23 @@
   int n_cols, n_rows;
 
   /* How many rows fit in the allocation */
-  n_rows = allocation->height / max_height;
-
-  /* Don't have more rows than buttons */
-  n_rows = MIN (n_rows, n_buttons);
+  n_rows = allocation->height / BUTTON_MAX_HEIGHT;
 
   /* At least one row */
   n_rows = MAX (n_rows, 1);
-  
-  /* We want to use as many rows as possible to limit the width */
-  n_cols = (n_buttons + n_rows - 1) / n_rows;
 
+  /* The number of buttons needed divided by the number of rows allocated
+     (the # of buttons we HAVE to fit) [rounded up] */
+  
+  n_cols = (n_buttons / n_rows) + ((n_buttons % n_rows == 0) ? 0 : 1);
+     
   /* At least one column */
   n_cols = MAX (n_cols, 1);
 
   *n_cols_out = n_cols;
   *n_rows_out = n_rows;
-  
-  return allocation->width / n_cols;
+
+  return MIN (allocation->width / n_cols, BUTTON_MAX_WIDTH);
 }
 
 static void
@@ -782,7 +786,6 @@
   GtkAllocation  fake_allocation;
   int max_height = 1;
   int max_width = 1;
-  /* int u_width, u_height; */
   GList *l;
   GArray *array;
   GList *ungrouped_class_groups;
@@ -796,9 +799,10 @@
   WnckTask *class_group_task;
   int lowest_range;
   int grouping_limit;
+  int b_width;
   
   tasklist = WNCK_TASKLIST (widget);
-
+  
   /* Calculate max needed height and width of the buttons */
   l = tasklist->priv->windows;
   while (l != NULL)
@@ -807,11 +811,6 @@
 
       gtk_widget_size_request (task->button, &child_req);
       
-      max_height = MAX (child_req.height,
-			max_height);
-      max_width = MAX (child_req.width,
-		       max_width);
-      
       l = l->next;
     }
 
@@ -822,11 +821,6 @@
       
       gtk_widget_size_request (task->button, &child_req);
       
-      max_height = MAX (child_req.height,
-			max_height);
-      max_width = MAX (child_req.width,
-		       max_width);
-      
       l = l->next;
     }
 
@@ -837,38 +831,13 @@
       
       gtk_widget_size_request (task->button, &child_req);
       
-      max_height = MAX (child_req.height,
-			max_height);
-      max_width = MAX (child_req.width,
-		       max_width);
-      
       l = l->next;
     }
   
-  tasklist->priv->max_button_width = max_width;
-  tasklist->priv->max_button_height = max_height;
-
-
-  /* this snippet of code seems to want to allocate at least
-   * four buttons' worth of height for the widget.  I think this isn't
-   * necessary any more now that we have the minimum_size option, so
-   * I'm commenting this out - thomasvs */
-  /*
-  gtk_widget_get_size_request (widget, &u_width, &u_height);
+  /* Benjamin Kahn: Give these real maximums */
+  tasklist->priv->max_button_width = BUTTON_MAX_WIDTH; 
+  tasklist->priv->max_button_height = BUTTON_MAX_HEIGHT;
 
-  if (u_height != -1)
-    {
-      requisition->height = u_height;
-    }
-  else if (u_width != -1)
-    {
-      requisition->width = u_width;
-      requisition->height = 4 * max_height;
-    }
-  
-  requisition->width = MAX(requisition->width, tasklist->priv->minimum_width);
-  requisition->height = MAX(requisition->height, tasklist->priv->minimum_height);
-  */
   requisition->width = tasklist->priv->minimum_width;
   requisition->height = tasklist->priv->minimum_height;
   
@@ -889,12 +858,12 @@
 			tasklist->priv->max_button_width);
   
   /* Try ungrouped mode */
-  wnck_tasklist_layout (&fake_allocation,
-			tasklist->priv->max_button_width,
-			tasklist->priv->max_button_height,
-			n_windows + n_startup_sequences,
-			&n_cols, &n_rows);
-
+  b_width = wnck_tasklist_layout (&fake_allocation,
+				  tasklist->priv->max_button_width,
+				  tasklist->priv->max_button_height,
+				  n_windows + n_startup_sequences,
+				  &n_cols, &n_rows);
+  
   last_n_cols = G_MAXINT;
   lowest_range = G_MAXINT;
   if (tasklist->priv->grouping != WNCK_TASKLIST_ALWAYS_GROUP)
@@ -921,11 +890,12 @@
 
       n_grouped_buttons += g_list_length (class_group_task->windows) - 1;
 
-      wnck_tasklist_layout (&fake_allocation,
+      b_width = wnck_tasklist_layout (&fake_allocation,
 			    tasklist->priv->max_button_width,
 			    tasklist->priv->max_button_height,
 			    n_startup_sequences + n_windows - n_grouped_buttons,
 			    &n_cols, &n_rows);
+
       if (n_cols != last_n_cols &&
 	  (tasklist->priv->grouping == WNCK_TASKLIST_AUTO_GROUP ||
 	   ungrouped_class_groups == NULL))
@@ -1078,9 +1048,8 @@
   /* Allocate children */
   l = visible_tasks;
   i = 0;
-  total_width = tasklist->priv->max_button_width * n_cols;
+  total_width = BUTTON_MAX_WIDTH * n_cols;
   total_width = MIN (total_width, allocation->width);
-  total_width = allocation->width;
   while (l != NULL)
     {
       WnckTask *task = WNCK_TASK (l->data);
