Off-by-one errors in stacking unmanaged windows.

svn path=/trunk/KDE/kdebase/workspace/; revision=800276
This commit is contained in:
Luboš Luňák 2008-04-23 20:10:35 +00:00
parent 1970e94260
commit 2ed7ffbac4

View file

@ -736,7 +736,7 @@ void Workspace::restackUnmanaged( Unmanaged* c, Window above )
if( unmanaged_stacking_order.at( i )->window() == above ) if( unmanaged_stacking_order.at( i )->window() == above )
{ {
if( i + 1 < unmanaged_stacking_order.size() if( i + 1 < unmanaged_stacking_order.size()
&& unmanaged_stacking_order.at( i ) == c ) && unmanaged_stacking_order.at( i + 1 ) == c )
{ {
// it is already there, do nothing // it is already there, do nothing
return; return;
@ -744,7 +744,7 @@ void Workspace::restackUnmanaged( Unmanaged* c, Window above )
unmanaged_stacking_order.removeAll( c ); unmanaged_stacking_order.removeAll( c );
if( was_below ) if( was_below )
--i; --i;
unmanaged_stacking_order.insert( i, c ); unmanaged_stacking_order.insert( i + 1, c );
addRepaint( c->geometry()); addRepaint( c->geometry());
return; return;
} }