Handle correctly the case when maximization changes in both direction

in opposite ways.
BUG: 153970


svn path=/trunk/KDE/kdebase/workspace/; revision=762644
This commit is contained in:
Luboš Luňák 2008-01-17 15:44:21 +00:00
parent 5c7798c884
commit d40cbd887a

View file

@ -1910,9 +1910,14 @@ void Client::changeMaximize( bool vertical, bool horizontal, bool adjust )
GeometryUpdatesBlocker blocker( this );
// maximing one way and unmaximizing the other way shouldn't happen
Q_ASSERT( !( vertical && horizontal )
|| ((( max_mode & MaximizeVertical ) != 0 ) == (( max_mode & MaximizeHorizontal ) != 0 )));
// maximing one way and unmaximizing the other way shouldn't happen,
// so restore first and then maximize the other way
if( ( old_mode == MaximizeVertical && max_mode == MaximizeHorizontal )
|| ( old_mode == MaximizeHorizontal && max_mode == MaximizeVertical ))
{
changeMaximize( false, false, false ); // restore
}
QRect clientArea = workspace()->clientArea( MaximizeArea, this );