Rearrange also when the number of presented windows changes.
svn path=/branches/work/kwin_composite/; revision=654365
This commit is contained in:
parent
a1fa5c4206
commit
520f3e27ac
1 changed files with 7 additions and 3 deletions
|
@ -355,16 +355,20 @@ void PresentWindowsEffect::rearrangeWindows()
|
|||
|
||||
if( !mWindowData.isEmpty()) // this is not the first arranging
|
||||
{
|
||||
bool canrearrange = canRearrangeClosest( windowlist );
|
||||
bool rearrange = canRearrangeClosest( windowlist ); // called before manipulating mWindowData
|
||||
DataHash newdata;
|
||||
EffectWindowList newlist = windowlist;
|
||||
EffectWindowList oldlist = mWindowData.keys();
|
||||
qSort( newlist );
|
||||
qSort( oldlist );
|
||||
for( DataHash::ConstIterator it = mWindowData.begin();
|
||||
it != mWindowData.end();
|
||||
++it )
|
||||
if( windowlist.contains( it.key())) // remove windows that are not in the window list
|
||||
newdata[ it.key() ] = *it;
|
||||
mWindowData = newdata;
|
||||
if( !canrearrange ) // canRearrange was called before adjusting the list, so that
|
||||
return; // changes can be detected
|
||||
if( !rearrange && newlist == oldlist )
|
||||
return;
|
||||
for( DataHash::Iterator it = mWindowData.begin();
|
||||
it != mWindowData.end();
|
||||
++it )
|
||||
|
|
Loading…
Reference in a new issue