Fix the strange stacking described in #68071.

svn path=/trunk/kdebase/kwin/; revision=266823
This commit is contained in:
Luboš Luňák 2003-11-13 15:34:04 +00:00
parent d46c7413c4
commit 037e47326c

View file

@ -502,6 +502,7 @@ ClientList Workspace::constrainedStackingOrder()
break; break;
} }
} }
// kdDebug() << "STACK:" << (*it) << ":" << ( it2 == stacking.end() ? ((Client*)0) : (*it2)) << endl;
if( it2 == stacking.end()) if( it2 == stacking.end())
{ {
--it; --it;
@ -511,6 +512,8 @@ ClientList Workspace::constrainedStackingOrder()
ClientList::Iterator remove_it = it; ClientList::Iterator remove_it = it;
--it; --it;
stacking.remove( remove_it ); stacking.remove( remove_it );
if( !current->transients().isEmpty()) // this one now can be possibly above its transients,
it = it2; // so go again higher in the stack order and possibly move those transients again
++it2; // insert after the mainwindow, it's ok if it2 is now stacking.end() ++it2; // insert after the mainwindow, it's ok if it2 is now stacking.end()
stacking.insert( it2, current ); stacking.insert( it2, current );
} }