[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-02-28 13:43:01
Message-ID: 20050228134301.7A8D2148A2 () office ! kde ! org
[Download RAW message or body]

CVS commit by lunakl: 

Break unnecessary transiency relations caused by many group transient \
windows. Avoids exponentially expensive operations in KWin.
CCBUG: 95231


  M +19 -0     group.cpp   2.34


--- kdebase/kwin/group.cpp  #2.33:2.34
@@ -542,4 +542,23 @@ void Client::checkGroupTransients()
             if( (*it2)->groupTransient() && (*it1)->hasTransient( *it2, \
true ) && (*it2)->hasTransient( *it1, true ))  \
(*it2)->transients_list.remove( *it1 ); +            // if there are \
already windows W1 and W2, W2 being transient for W1, and group transient \
W3 +            // is added, make it transient only for W2, not for W1, \
because it's already indirectly +            // transient for it - the \
indirect transiency actually shouldn't break anything, +            // but \
it can lead to exponentially expensive operations (#95231) +            // \
TODO this is pretty slow as well +            for( \
ClientList::ConstIterator it3 = group()->members().begin(); +               \
it3 != group()->members().end(); +                 ++it3 )
+                {
+                if( *it1 == *it2 || *it2 == *it3 || *it1 == *it3 )
+                    continue;
+                if( (*it2)->hasTransient( *it1, false ) && \
(*it3)->hasTransient( *it1, false )) +                    {
+                    if( (*it2)->hasTransient( *it3, true ))
+                        (*it3)->transients_list.remove( *it1 );
+                    if( (*it3)->hasTransient( *it2, true ))
+                        (*it2)->transients_list.remove( *it1 );
+                    }
+                }
             }
         }


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

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