Since hasTransient() can search bottom-up or top-bottom depending

on which is cheaper, make sure to block recursion for the proper
client that has been already checked.
BUG: 94800

svn path=/trunk/kdebase/kwin/; revision=400008
icc-effect-5.14.5
Luboš Luňák 2005-03-23 14:52:54 +00:00
parent a950f75673
commit c32d95f0f2
1 changed files with 6 additions and 3 deletions

View File

@ -692,15 +692,15 @@ bool Client::hasTransient( const Client* cl, bool indirect ) const
bool Client::hasTransientInternal( const Client* cl, bool indirect, ConstClientList& set ) const
{
if( set.contains( this ))
return false;
set.append( this );
if( cl->transientFor() != NULL )
{
if( cl->transientFor() == this )
return true;
if( !indirect )
return false;
if( set.contains( cl ))
return false;
set.append( cl );
return hasTransientInternal( cl->transientFor(), indirect, set );
}
if( !cl->isTransient())
@ -712,6 +712,9 @@ bool Client::hasTransientInternal( const Client* cl, bool indirect, ConstClientL
return true;
if( !indirect )
return false;
if( set.contains( this ))
return false;
set.append( this );
for( ClientList::ConstIterator it = transients().begin();
it != transients().end();
++it )