fix restore size for shaded windows
BUG: 243423 REVIEW: 104236
This commit is contained in:
parent
0aefd56e0f
commit
d791b6e421
1 changed files with 9 additions and 4 deletions
13
geometry.cpp
13
geometry.cpp
|
@ -2172,20 +2172,25 @@ void Client::changeMaximize(bool vertical, bool horizontal, bool adjust)
|
||||||
clientArea = workspace()->clientArea(MaximizeArea, this);
|
clientArea = workspace()->clientArea(MaximizeArea, this);
|
||||||
|
|
||||||
// save sizes for restoring, if maximalizing
|
// save sizes for restoring, if maximalizing
|
||||||
|
QSize sz;
|
||||||
|
if (isShade())
|
||||||
|
sz = sizeForClientSize(clientSize());
|
||||||
|
else
|
||||||
|
sz = size();
|
||||||
if (!adjust && !(old_mode & MaximizeVertical)) {
|
if (!adjust && !(old_mode & MaximizeVertical)) {
|
||||||
geom_restore.setTop(y());
|
geom_restore.setTop(y());
|
||||||
geom_restore.setHeight(height());
|
geom_restore.setHeight(sz.height());
|
||||||
// we can fall from maximize to tiled
|
// we can fall from maximize to tiled
|
||||||
// TODO unify quicktiling and regular maximization
|
// TODO unify quicktiling and regular maximization
|
||||||
geom_pretile.setTop(y());
|
geom_pretile.setTop(y());
|
||||||
geom_pretile.setHeight(height());
|
geom_pretile.setHeight(sz.height());
|
||||||
}
|
}
|
||||||
if (!adjust && !(old_mode & MaximizeHorizontal)) {
|
if (!adjust && !(old_mode & MaximizeHorizontal)) {
|
||||||
geom_restore.setLeft(x());
|
geom_restore.setLeft(x());
|
||||||
geom_restore.setWidth(width());
|
geom_restore.setWidth(sz.width());
|
||||||
// see above
|
// see above
|
||||||
geom_pretile.setLeft(x());
|
geom_pretile.setLeft(x());
|
||||||
geom_pretile.setWidth(width());
|
geom_pretile.setWidth(sz.width());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options->borderlessMaximizedWindows()) {
|
if (options->borderlessMaximizedWindows()) {
|
||||||
|
|
Loading…
Reference in a new issue