Index: libwnck/tasklist.c
===================================================================
RCS file: /cvs/gnome/libwnck/libwnck/tasklist.c,v
retrieving revision 1.78
diff -u -p -r1.78 tasklist.c
--- libwnck/tasklist.c	16 Jun 2005 17:32:36 -0000	1.78
+++ libwnck/tasklist.c	17 Jul 2005 11:55:14 -0000
@@ -1886,6 +1886,18 @@ wnck_tasklist_active_window_changed (Wnc
   active_task = g_hash_table_lookup (tasklist->priv->win_hash,
 				     active_window);
 
+  if (active_window && !active_task)
+    {
+      gulong transient_id;
+      transient_id = wnck_window_get_transient(active_window);
+      if (transient_id)
+        {
+          active_window = wnck_window_get(transient_id);
+          active_task = g_hash_table_lookup (tasklist->priv->win_hash,
+            active_window);
+        }
+    }
+  
   wnck_tasklist_change_active_task (tasklist, active_task);
 }
 
Index: libwnck/window.c
===================================================================
RCS file: /cvs/gnome/libwnck/libwnck/window.c,v
retrieving revision 1.55
diff -u -p -r1.55 window.c
--- libwnck/window.c	16 Jun 2005 17:32:36 -0000	1.55
+++ libwnck/window.c	17 Jul 2005 11:55:16 -0000
@@ -496,6 +496,14 @@ wnck_window_get_xid (WnckWindow *window)
   return window->priv->xwindow;
 }
 
+gulong
+wnck_window_get_transient (WnckWindow *window)
+{
+  g_return_val_if_fail (WNCK_IS_WINDOW (window), None);
+  
+  return window->priv->transient_for;
+}
+
 WnckClassGroup *
 wnck_window_get_class_group (WnckWindow *window)
 {
Index: libwnck/window.h
===================================================================
RCS file: /cvs/gnome/libwnck/libwnck/window.h,v
retrieving revision 1.32
diff -u -p -r1.32 window.h
--- libwnck/window.h	16 Jun 2005 17:32:36 -0000	1.32
+++ libwnck/window.h	17 Jul 2005 11:55:16 -0000
@@ -139,6 +139,7 @@ const char* wnck_window_get_icon_name (W
 WnckApplication* wnck_window_get_application  (WnckWindow *window);
 gulong           wnck_window_get_group_leader (WnckWindow *window);
 gulong           wnck_window_get_xid          (WnckWindow *window);
+gulong           wnck_window_get_transient    (WnckWindow *window);
 
 WnckClassGroup *wnck_window_get_class_group (WnckWindow *window);
 
