diff --git a/ChangeLog b/ChangeLog index 082b60e26..fd0f3ae93 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2006-02-27 Elijah Newren + + Patch from Thomas Thurman to work around buggy application + grouping with transient windows. #328211 + + * src/group.c (meta_window_compute_group): + Put transients in the same group with their parent, always. + + * src/window.c (update_transient_for): + Update group too + 2006-02-27 Elijah Newren * configure.in: diff --git a/src/group.c b/src/group.c index 2d8d69c8b..8f79ad5ff 100644 --- a/src/group.c +++ b/src/group.c @@ -123,7 +123,10 @@ meta_window_compute_group (MetaWindow* window) 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* window) } 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 diff --git a/src/window.c b/src/window.c index 41718b584..eb10ef373 100644 --- a/src/window.c +++ b/src/window.c @@ -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