? .group.c.swp
? .window.c.swp
? libmetacity-private.la
? libmetacity_private_la-gradient.lo
? libmetacity_private_la-preview-widget.lo
? libmetacity_private_la-theme-parser.lo
? libmetacity_private_la-theme.lo
? libmetacity_private_la-util.lo
? tools/.deps
? tools/.libs
? wm-tester/.deps
? wm-tester/.libs
Index: group.c
===================================================================
RCS file: /cvs/gnome/metacity/src/group.c,v
retrieving revision 1.9
diff -u -p -r1.9 group.c
--- group.c	23 Feb 2004 01:48:29 -0000	1.9
+++ group.c	23 Feb 2006 02:02:06 -0000
@@ -123,7 +123,10 @@ meta_window_compute_group (MetaWindow* w
       
   if (window->display->groups_by_leader)
     {
-      if (window->xgroup_leader != None)
+      if (window->xtransient_for != None)
+        group = g_hash_table_lookup (window->display->groups_by_leader,
+                                     &window->xtransient_for);
+      else if (window->xgroup_leader != None)
         group = g_hash_table_lookup (window->display->groups_by_leader,
                                      &window->xgroup_leader);
       else
@@ -138,7 +141,10 @@ meta_window_compute_group (MetaWindow* w
     }
   else
     {
-      if (window->xgroup_leader != None)
+      if (window->xtransient_for != None)
+        group = meta_group_new (window->display,
+                                window->xtransient_for);
+      else if (window->xgroup_leader != None)
         group = meta_group_new (window->display,
                                 window->xgroup_leader);
       else
Index: window.c
===================================================================
RCS file: /cvs/gnome/metacity/src/window.c,v
retrieving revision 1.418
diff -u -p -r1.418 window.c
--- window.c	15 Feb 2006 19:50:12 -0000	1.418
+++ window.c	23 Feb 2006 02:02:12 -0000
@@ -5468,6 +5468,15 @@ update_transient_for (MetaWindow *window
 
   /* update stacking constraints */
   meta_stack_update_transient (window->screen->stack, window);
+
+  /* possibly change its group. We treat being a window's transient as
+   * equivalent to making it your group leader, to work around shortcomings
+   * in programs such as xmms-- see #328211.
+   */
+  if (window->xtransient_for != None &&
+      window->xgroup_leader != None &&
+      window->xtransient_for != window->xgroup_leader)
+    meta_window_group_leader_changed (window);
 }
 
 static void
