From c101518499682f5627a912f3208c822998a44c0f Mon Sep 17 00:00:00 2001 From: Matthias Ettrich Date: Mon, 22 Nov 1999 02:23:13 +0000 Subject: [PATCH] small fix svn path=/trunk/kdebase/kwin/; revision=34663 --- client.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/client.cpp b/client.cpp index f85d28de95..f562e601c1 100644 --- a/client.cpp +++ b/client.cpp @@ -709,13 +709,16 @@ QSize Client::sizeForWindowSize( const QSize& wsize, bool ignore_height) const } int ww = wwrap->width(); - int wh = 0;; + int wh = 0; 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() ), maximumWidth() ), - ignore_height? height()-wh : (QMIN( QMAX( height() - wh + h, minimumHeight() ), + ignore_height? height()-wh+h : (QMIN( QMAX( height() - wh + h, minimumHeight() ), maximumHeight() ) ) ); } @@ -1363,7 +1366,7 @@ void Client::setShade( bool s ) resize (s ); } else { int h = height(); - QSize s( sizeForWindowSize( windowWrapper()->size() ) ); + QSize s( sizeForWindowSize( windowWrapper()->size(), TRUE ) ); setWFlags( WNorthWestGravity ); int step = QMAX( 15, QABS( h - s.height() ) / 30 )+1; while ( h < s.height() - step ) {