- /* If we used to be transient for a group and now we are not, or we're
- transient for a new group, then we need to remove ourselves from all
- our ex-parents */
- if (oldgtran && (oldgroup != newgroup || oldgtran != newgtran))
- {
- for (it = self->parents; it; it = next) {
- next = g_slist_next(it);
- c = it->data;
- if (!c->transient_for_group && client_normal(c)) {
- c->transients = g_slist_remove(c->transients, self);
- self->parents = g_slist_delete_link(self->parents, it);
- }
- }
- }
- /* If we used to be transient for a single window and we are no longer
- transient for it, then we need to remove ourself from its children */
- else if (oldparent && oldparent != newparent &&
- client_normal(oldparent))
- {
- oldparent->transients = g_slist_remove(oldparent->transients, self);
- self->parents = g_slist_remove(self->parents, oldparent);
- }
-
- /** Re-add the client to the transient tree wherever it has changed **/