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
|
if( !mWindowData.isEmpty()) // this is not the first arranging
|
||||||
{
|
{
|
||||||
bool canrearrange = canRearrangeClosest( windowlist );
|
bool rearrange = canRearrangeClosest( windowlist ); // called before manipulating mWindowData
|
||||||
DataHash newdata;
|
DataHash newdata;
|
||||||
|
EffectWindowList newlist = windowlist;
|
||||||
|
EffectWindowList oldlist = mWindowData.keys();
|
||||||
|
qSort( newlist );
|
||||||
|
qSort( oldlist );
|
||||||
for( DataHash::ConstIterator it = mWindowData.begin();
|
for( DataHash::ConstIterator it = mWindowData.begin();
|
||||||
it != mWindowData.end();
|
it != mWindowData.end();
|
||||||
++it )
|
++it )
|
||||||
if( windowlist.contains( it.key())) // remove windows that are not in the window list
|
if( windowlist.contains( it.key())) // remove windows that are not in the window list
|
||||||
newdata[ it.key() ] = *it;
|
newdata[ it.key() ] = *it;
|
||||||
mWindowData = newdata;
|
mWindowData = newdata;
|
||||||
if( !canrearrange ) // canRearrange was called before adjusting the list, so that
|
if( !rearrange && newlist == oldlist )
|
||||||
return; // changes can be detected
|
return;
|
||||||
for( DataHash::Iterator it = mWindowData.begin();
|
for( DataHash::Iterator it = mWindowData.begin();
|
||||||
it != mWindowData.end();
|
it != mWindowData.end();
|
||||||
++it )
|
++it )
|
||||||
|
|
Loading…
Reference in a new issue