TWin: Fix tiling from window menu and geom_restore. Resolves issue #624

Signed-off-by: rbell <riley.bell@vfemail.net>
pull/628/head
rbell 5 months ago
parent 09652da14d
commit d91c954dc2

@ -1915,12 +1915,12 @@ void Client::changeMaximize( bool vertical, bool horizontal, bool adjust )
TQRect clientArea = workspace()->clientArea( MaximizeArea, this );
// save sizes for restoring, if maximalizing
if( !adjust && !( y() == clientArea.top() && height() == clientArea.height()))
if( !activeTiled && !adjust && !( y() == clientArea.top() && height() == clientArea.height()))
{
geom_restore.setTop( y());
geom_restore.setHeight( height());
}
if( !adjust && !( x() == clientArea.left() && width() == clientArea.width()))
if( !activeTiled && !adjust && !( x() == clientArea.left() && width() == clientArea.width()))
{
geom_restore.setLeft( x());
geom_restore.setWidth( width());
@ -2833,7 +2833,10 @@ TQRect Client::activeBorderMaximizeGeometry()
void Client::tileToBorder(ActiveBorder border) {
if (!isResizable()) return;
activeTiled = true;
if (maximizeMode() == MaximizeRestore)
geom_restore = geometry();
setActiveBorderMode(ActiveTilingMode);
setActiveBorderPos(TQCursor().pos());
setActiveBorder(border);
TQRect geo = activeBorderMaximizeGeometry();
if (geo.isValid() && !geo.isEmpty()) {

Loading…
Cancel
Save