aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lübking <thomas.luebking@gmail.com>2011-08-10 21:54:28 (GMT)
committerThomas Lübking <thomas.luebking@gmail.com>2011-08-11 12:19:01 (GMT)
commit561dac0ae1bd158563e4aa6d0f25268fbc5a97af (patch)
tree0f69f26269a786a289f6475a4faec05ddccec0f4
parent55f606be4640338ce5ac2d1bac706636183cdcc7 (diff)
QRect::right() + 1 == QRect::x() + QRect::width()
Also to catch inner split for sure the calculation needs to be accurate. BUG: 279774 REVIEW: 102292
-rw-r--r--kwin/geometry.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/kwin/geometry.cpp b/kwin/geometry.cpp
index 2bc059c..c5e4fd9 100644
--- a/kwin/geometry.cpp
+++ b/kwin/geometry.cpp
@@ -3174,13 +3174,13 @@ QRect Client::electricBorderMaximizeGeometry(QPoint pos, int desktop)
QRect ret = workspace()->clientArea(MaximizeArea, pos, desktop);
if (electricMode & QuickTileLeft)
- ret.setRight(ret.left()+ret.width()/2);
+ ret.setRight(ret.left()+ret.width()/2 - 1);
else if (electricMode & QuickTileRight)
- ret.setLeft(ret.right()-ret.width()/2);
+ ret.setLeft(ret.right()-(ret.width()-ret.width()/2) + 1);
if (electricMode & QuickTileTop)
- ret.setBottom(ret.top()+ret.height()/2);
+ ret.setBottom(ret.top()+ret.height()/2 - 1);
else if (electricMode & QuickTileBottom)
- ret.setTop(ret.bottom()-ret.height()/2);
+ ret.setTop(ret.bottom()-(ret.height()-ret.height()/2) + 1);
return ret;
}