reenabled maximize smartness

svn path=/trunk/kdebase/kwin/; revision=83642
icc-effect-5.14.5
Matthias Ettrich 2001-02-19 12:17:03 +00:00
parent aa219e51db
commit 5651bcb69d
1 changed files with 26 additions and 28 deletions

View File

@ -711,13 +711,12 @@ bool Client::manage( bool isMapped, bool doNotShow, bool isInitial )
else if ( info->state() & NET::MaxHoriz )
maximize( Client::MaximizeHorizontal );
/*
if ( isMaximizable() && !isMaximized()
&& ( width() >= area.width() || height() >= area.height() ) ) {
// window is too large for the screen, maximize in the
// directions necessary and generate a suitable restore
// geometry.
QSize s = adjustedSize( QSize( width()*2/3, height()*2/3 ) );
QSize s = adjustedSize( QSize( area.width()*2/3, area.height()*2/3 ) );
if ( width() >= area.width() && height() >= area.height() ) {
maximize( Client::MaximizeFull );
geom_restore.setSize( s );
@ -731,7 +730,7 @@ bool Client::manage( bool isMapped, bool doNotShow, bool isInitial )
geom_restore.setHeight( s.height() );
geom_restore.moveCenter( geometry().center() );
}
}*/
}
}
delete session;
@ -1072,9 +1071,8 @@ bool Client::configureRequest( XConfigureRequestEvent& e )
nh = e.height;
QSize ns = sizeForWindowSize( QSize( nw, nh ) );
QRect area = workspace()->clientArea();
if ( isMaximizable() && isMaximized()
&& ( ns.width() < area.width() || ns.height() < area.height() ) ) {
//QRect area = workspace()->clientArea();
if ( isMaximizable() && isMaximized() ) { //&& ( ns.width() < area.width() || ns.height() < area.height() ) ) {
geom_restore.setSize( ns );
maximize( Client::MaximizeRestore );
} else if ( !isMaximized() ) {