From 7abacfa2fb262b1101e8754df76a4a9356eae24c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Wed, 17 Aug 2005 09:34:00 +0000 Subject: [PATCH] When just adjusting maximized state e.g. because of workarea changes, don't destroy data about restoring back. svn path=/trunk/KDE/kdebase/kwin/; revision=449976 --- geometry.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/geometry.cpp b/geometry.cpp index b5472491ef..c83e8885d9 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -1815,12 +1815,12 @@ void Client::changeMaximize( bool vertical, bool horizontal, bool adjust ) QRect clientArea = workspace()->clientArea( MaximizeArea, this ); // save sizes for restoring, if maximalizing - if( !( y() == clientArea.top() && height() == clientArea.height())) + if( !adjust && !( y() == clientArea.top() && height() == clientArea.height())) { geom_restore.setTop( y()); geom_restore.setHeight( height()); } - if( !( x() == clientArea.left() && width() == clientArea.width())) + if( !adjust && !( x() == clientArea.left() && width() == clientArea.width())) { geom_restore.setLeft( x()); geom_restore.setWidth( width()); @@ -1932,10 +1932,13 @@ void Client::changeMaximize( bool vertical, bool horizontal, bool adjust ) case MaximizeFull: { - if( old_mode & MaximizeVertical ) - maxmode_restore = MaximizeVertical; - if( old_mode & MaximizeHorizontal ) - maxmode_restore = MaximizeHorizontal; + if( !adjust ) + { + if( old_mode & MaximizeVertical ) + maxmode_restore = MaximizeVertical; + if( old_mode & MaximizeHorizontal ) + maxmode_restore = MaximizeHorizontal; + } QSize adjSize = adjustedSize(clientArea.size(), SizemodeMax ); QRect r = QRect(clientArea.topLeft(), adjSize); setGeometry( r );