CT: fix the desktop cascading (got broken sometime during my 2 years sleep).

Closes bug:5370, the oldest kwin bug (filed as a wish, but really a bug).

svn path=/trunk/kdebase/kwin/; revision=147571
This commit is contained in:
Cristian Tibirna 2002-04-07 06:55:48 +00:00
parent e104c57e6a
commit de30273aad

View file

@ -2001,14 +2001,18 @@ void Workspace::setClientIsMoving( Client *c )
*/
void Workspace::cascadeDesktop()
{
ClientList::Iterator it(clients.fromLast());
for (; it != clients.end(); --it) {
ClientList::Iterator it(stacking_order.begin());
bool re_init_cascade_at_first_client = true;
for (; it != stacking_order.end(); ++it) {
if((!(*it)->isOnDesktop(currentDesktop())) ||
((*it)->isIconified()) ||
((*it)->isSticky()) ||
(!(*it)->isMovable()) )
continue;
cascadePlacement(*it);
cascadePlacement(*it, re_init_cascade_at_first_client);
//CT is an if faster than an attribution??
if (re_init_cascade_at_first_client)
re_init_cascade_at_first_client = false;
}
}