summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lübking <thomas.luebking@gmail.com>2012-03-12 02:05:35 (GMT)
committerThomas Lübking <thomas.luebking@gmail.com>2012-03-13 20:38:55 (GMT)
commit5b11bf56780928cd531143ad6675bbe775548f92 (patch)
tree77712998e21792ed69ae4cc51897ad5181ad26d6
parent677915da069b4d563b40250c4b69943af53a70bd (diff)
fix restore size for shaded windows
BUG: 243423 REVIEW: 104236
-rw-r--r--kwin/geometry.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/kwin/geometry.cpp b/kwin/geometry.cpp
index 8af615f..49ddd29 100644
--- a/kwin/geometry.cpp
+++ b/kwin/geometry.cpp
@@ -2172,20 +2172,25 @@ void Client::changeMaximize(bool vertical, bool horizontal, bool adjust)
clientArea = workspace()->clientArea(MaximizeArea, this);
// save sizes for restoring, if maximalizing
+ QSize sz;
+ if (isShade())
+ sz = sizeForClientSize(clientSize());
+ else
+ sz = size();
if (!adjust && !(old_mode & MaximizeVertical)) {
geom_restore.setTop(y());
- geom_restore.setHeight(height());
+ geom_restore.setHeight(sz.height());
// we can fall from maximize to tiled
// TODO unify quicktiling and regular maximization
geom_pretile.setTop(y());
- geom_pretile.setHeight(height());
+ geom_pretile.setHeight(sz.height());
}
if (!adjust && !(old_mode & MaximizeHorizontal)) {
geom_restore.setLeft(x());
- geom_restore.setWidth(width());
+ geom_restore.setWidth(sz.width());
// see above
geom_pretile.setLeft(x());
- geom_pretile.setWidth(width());
+ geom_pretile.setWidth(sz.width());
}
if (options->borderlessMaximizedWindows()) {