[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdebase/kwin
From:       Luboš Luňák <l.lunak () kde ! org>
Date:       2005-03-23 14:52:55
Message-ID: 20050323145255.207993CD () office ! kde ! org
[Download RAW message or body]

CVS commit by lunakl: 

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


  M +6 -3      group.cpp   2.35


--- kdebase/kwin/group.cpp  #2.34:2.35
@@ -693,7 +693,4 @@ bool Client::hasTransient( const Client*
 bool Client::hasTransientInternal( const Client* cl, bool indirect, ConstClientList& set ) const
     {
-    if( set.contains( this ))
-        return false;
-    set.append( this );
     if( cl->transientFor() != NULL )
         {
@@ -702,4 +699,7 @@ bool Client::hasTransientInternal( const
         if( !indirect )
             return false;
+        if( set.contains( cl ))
+            return false;
+        set.append( cl );
         return hasTransientInternal( cl->transientFor(), indirect, set );
         }
@@ -713,4 +713,7 @@ bool Client::hasTransientInternal( const
     if( !indirect )
         return false;
+    if( set.contains( this ))
+        return false;
+    set.append( this );
     for( ClientList::ConstIterator it = transients().begin();
          it != transients().end();


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic