preserve actual geom_restore on QuickTileMaximize

BUG: 342981
REVIEW: 122118

The geometry of the window when entering QTM is
a technical detail (caused by the maximizing action
of moving the window to the upper edge) and thus
does not qualify as geometry the window should be
restored to (using a deoc button, shortcut etc.)
This commit is contained in:
Thomas Lübking 2015-01-17 23:55:38 +01:00
parent 55d29bd310
commit f82a6a545c

View file

@ -3134,6 +3134,7 @@ void Client::setQuickTileMode(QuickTileMode mode, bool keyboard)
if (maximizeMode() == MaximizeFull) { if (maximizeMode() == MaximizeFull) {
setMaximize(false, false); setMaximize(false, false);
} else { } else {
QRect prev_geom_restore = geom_restore; // setMaximize() would set moveResizeGeom as geom_restore
setMaximize(true, true); setMaximize(true, true);
QRect clientArea = workspace()->clientArea(MaximizeArea, this); QRect clientArea = workspace()->clientArea(MaximizeArea, this);
if (geometry().top() != clientArea.top()) { if (geometry().top() != clientArea.top()) {
@ -3142,6 +3143,7 @@ void Client::setQuickTileMode(QuickTileMode mode, bool keyboard)
setGeometry(r); setGeometry(r);
} }
quick_tile_mode = QuickTileMaximize; quick_tile_mode = QuickTileMaximize;
geom_restore = prev_geom_restore;
} }
emit quickTileModeChanged(); emit quickTileModeChanged();
return; return;