transient_for is now only used to check for OB_TRAN_GROUP

This commit is contained in:
Dana Jansens 2007-06-07 03:43:22 +00:00
parent 428880d75a
commit a79e51c64f

View file

@ -1293,8 +1293,7 @@ static void client_update_transient_tree(ObClient *self,
for (it = self->parents; it; it = next) { for (it = self->parents; it; it = next) {
next = g_slist_next(it); next = g_slist_next(it);
c = it->data; c = it->data;
if ((!c->transient_for || c->transient_for != OB_TRAN_GROUP) && if (c->transient_for != OB_TRAN_GROUP && client_normal(c))
client_normal(c))
{ {
c->transients = g_slist_remove(c->transients, self); c->transients = g_slist_remove(c->transients, self);
self->parents = g_slist_delete_link(self->parents, it); self->parents = g_slist_delete_link(self->parents, it);
@ -1320,9 +1319,7 @@ static void client_update_transient_tree(ObClient *self,
for (it = oldgroup->members; it; it = g_slist_next(it)) { for (it = oldgroup->members; it; it = g_slist_next(it)) {
c = it->data; c = it->data;
if (c != self && if (c != self &&
(!c->transient_for || c->transient_for != OB_TRAN_GROUP && client_normal(c))
c->transient_for != OB_TRAN_GROUP) &&
client_normal(c))
{ {
c->transients = g_slist_prepend(c->transients, self); c->transients = g_slist_prepend(c->transients, self);
self->parents = g_slist_prepend(self->parents, c); self->parents = g_slist_prepend(self->parents, c);
@ -1356,14 +1353,14 @@ static void client_update_transient_tree(ObClient *self,
A can't be transient for C or we have a cycle A can't be transient for C or we have a cycle
*/ */
if (oldgroup != newgroup && newgroup != NULL && if (oldgroup != newgroup && newgroup != NULL &&
newparent != OB_TRAN_GROUP) newparent != OB_TRAN_GROUP &&
client_normal(self))
{ {
for (it = newgroup->members; it; it = g_slist_next(it)) { for (it = newgroup->members; it; it = g_slist_next(it)) {
c = it->data; c = it->data;
if (c != self && c->transient_for == OB_TRAN_GROUP && if (c != self && c->transient_for == OB_TRAN_GROUP &&
/* Don't make it our child if it is already our parent */ /* Don't make it our child if it is already our parent */
!client_is_direct_child(c, self) && !client_is_direct_child(c, self))
client_normal(self))
{ {
self->transients = g_slist_prepend(self->transients, c); self->transients = g_slist_prepend(self->transients, c);
c->parents = g_slist_prepend(c->parents, self); c->parents = g_slist_prepend(c->parents, self);
@ -1848,7 +1845,7 @@ void client_update_wmhints(ObClient *self)
transient for something, even if transient_for was NULL because transient for something, even if transient_for was NULL because
it wasn't in a group before. it wasn't in a group before.
If transient_for was NULL and oldgroup was NULL we can assume If parents was NULL and oldgroup was NULL we can assume
that when we add the new group, it will become transient for that when we add the new group, it will become transient for
something. something.
@ -1860,7 +1857,7 @@ void client_update_wmhints(ObClient *self)
updated. updated.
*/ */
if (self->transient && if (self->transient &&
((self->transient_for == NULL && oldgroup == NULL) || ((self->parents == NULL && oldgroup == NULL) ||
(self->transient_for == OB_TRAN_GROUP && !self->group))) (self->transient_for == OB_TRAN_GROUP && !self->group)))
client_update_transient_for(self); client_update_transient_for(self);
} }