Index: libwnck/tasklist.c
===================================================================
RCS file: /cvs/gnome/libwnck/libwnck/tasklist.c,v
retrieving revision 1.85
diff -u -p -r1.85 tasklist.c
--- libwnck/tasklist.c	24 Jul 2005 01:09:36 -0000	1.85
+++ libwnck/tasklist.c	24 Jul 2005 19:48:37 -0000
@@ -206,6 +206,8 @@ static gboolean wnck_task_get_needs_atte
 
 static char      *wnck_task_get_text (WnckTask *task, gboolean icon_text);
 static GdkPixbuf *wnck_task_get_icon (WnckTask *task);
+static gint       wnck_task_compare_alphabetically (gconstpointer  a,
+                                                    gconstpointer  b);
 static gint       wnck_task_compare  (gconstpointer  a,
 				      gconstpointer  b);
 static void       wnck_task_update_visible_state (WnckTask *task);
@@ -1292,6 +1294,10 @@ wnck_tasklist_size_allocate (GtkWidget  
       if (g_list_length (class_group_task->windows) > 1)
 	{
 	  visible_tasks = g_list_prepend (visible_tasks, class_group_task);
+
+          /* Sort */
+          class_group_task->windows = g_list_sort (class_group_task->windows,
+                                                   wnck_task_compare_alphabetically);
 	  
 	  /* Hide all this group's windows */
 	  l = class_group_task->windows;
@@ -3060,6 +3066,17 @@ wnck_task_expose (GtkWidget        *widg
 }
 
 static gint
+wnck_task_compare_alphabetically (gconstpointer  a,
+                                  gconstpointer  b)
+{
+  WnckTask *task1 = WNCK_TASK (a);
+  WnckTask *task2 = WNCK_TASK (b);
+
+  return g_utf8_collate (wnck_task_get_text(task1, FALSE),
+                         wnck_task_get_text(task2, FALSE));
+}
+
+static gint
 compare_class_group_tasks (WnckTask *task1, WnckTask *task2)
 {
   const char *name1, *name2;
