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() void Workspace::cascadeDesktop()
{ {
ClientList::Iterator it(clients.fromLast()); ClientList::Iterator it(stacking_order.begin());
for (; it != clients.end(); --it) { bool re_init_cascade_at_first_client = true;
for (; it != stacking_order.end(); ++it) {
if((!(*it)->isOnDesktop(currentDesktop())) || if((!(*it)->isOnDesktop(currentDesktop())) ||
((*it)->isIconified()) || ((*it)->isIconified()) ||
((*it)->isSticky()) || ((*it)->isSticky()) ||
(!(*it)->isMovable()) ) (!(*it)->isMovable()) )
continue; 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;
} }
} }