Commit 561dac0a authored by Thomas Lübking's avatar Thomas Lübking
Browse files

QRect::right() + 1 == QRect::x() + QRect::width()

Also to catch inner split for sure the calculation needs to be accurate.

BUG: 279774
REVIEW: 102292
parent 55f606be
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment