small fix

svn path=/trunk/kdebase/kwin/; revision=34663
This commit is contained in:
Matthias Ettrich 1999-11-22 02:23:13 +00:00
parent 367d4fd0d7
commit c101518499

View file

@ -709,13 +709,16 @@ QSize Client::sizeForWindowSize( const QSize& wsize, bool ignore_height) const
} }
int ww = wwrap->width(); int ww = wwrap->width();
int wh = 0;; int wh = 0;
if ( !wwrap->testWState( WState_ForceHide ) ) if ( !wwrap->testWState( WState_ForceHide ) )
wh = wwrap->height(); wh = wwrap->height();
if ( ignore_height && wsize.height() == 0 )
h = 0;
return QSize( QMIN( QMAX( width() - ww + w, minimumWidth() ), return QSize( QMIN( QMAX( width() - ww + w, minimumWidth() ),
maximumWidth() ), maximumWidth() ),
ignore_height? height()-wh : (QMIN( QMAX( height() - wh + h, minimumHeight() ), ignore_height? height()-wh+h : (QMIN( QMAX( height() - wh + h, minimumHeight() ),
maximumHeight() ) ) ); maximumHeight() ) ) );
} }
@ -1363,7 +1366,7 @@ void Client::setShade( bool s )
resize (s ); resize (s );
} else { } else {
int h = height(); int h = height();
QSize s( sizeForWindowSize( windowWrapper()->size() ) ); QSize s( sizeForWindowSize( windowWrapper()->size(), TRUE ) );
setWFlags( WNorthWestGravity ); setWFlags( WNorthWestGravity );
int step = QMAX( 15, QABS( h - s.height() ) / 30 )+1; int step = QMAX( 15, QABS( h - s.height() ) / 30 )+1;
while ( h < s.height() - step ) { while ( h < s.height() - step ) {