off-by-one error when ensuring a window in the bottom-right corner

doesn't go outside the workarea


svn path=/trunk/KDE/kdebase/workspace/; revision=1165452
This commit is contained in:
Luboš Luňák 2010-08-19 12:08:33 +00:00
parent 2d01df9e04
commit 87d373e9cd

View file

@ -876,9 +876,9 @@ void Client::keepInArea( QRect area, bool partial )
resizeWithChecks( qMin( area.width(), width()), qMin( area.height(), height()));
}
if ( geometry().right() > area.right() && width() < area.width() )
move( area.right() - width(), y() );
move( area.right() - width() + 1, y() );
if ( geometry().bottom() > area.bottom() && height() < area.height() )
move( x(), area.bottom() - height() );
move( x(), area.bottom() - height() + 1 );
if( !area.contains( geometry().topLeft() ))
{
int tx = x();