Avoid making windows transient to themselves.

Don't worry about creating loops with group transients, checkGroupTransients()
will check for them and has better chances to break them correctly.

svn path=/trunk/kdebase/kwin/; revision=269292
This commit is contained in:
Luboš Luňák 2003-11-24 14:24:04 +00:00
parent 87f8a85083
commit fe0ab6d200

View file

@ -340,7 +340,7 @@ void Client::setTransient( Window new_transient_for_id )
for( ClientList::ConstIterator it = group()->members().begin();
it != group()->members().end();
++it )
if( !(*it)->groupTransient())
if( *it != this )
(*it)->addTransient( this );
}
else if( transient_for_id != None )
@ -714,6 +714,8 @@ void Client::checkGroup()
{
if( !(*it)->groupTransient()) // and its transient for group transients in the new group
continue;
if( *it == this )
continue;
addTransient( *it );
}
checkGroupTransients();