window: fix checkWorkspacePosition moveRight/Bottom

With QRectF, moveRight and moveBottom have an effective offset of 1 vs QRect
This commit is contained in:
Xaver Hugl 2022-11-02 17:23:56 +01:00 committed by Vlad Zahorodnii
parent 3d9618316b
commit d5a2c639a0

View file

@ -4132,10 +4132,10 @@ void Window::checkWorkspacePosition(QRectF oldGeometry, const VirtualDesktop *ol
newGeom.moveTop(qMax(topMax, screenArea.y()));
}
if (save[Right] || keep[Right]) {
newGeom.moveRight(qMin(rightMax, screenArea.right()));
newGeom.moveRight(qMin(rightMax, screenArea.right()) + 1);
}
if (save[Bottom] || keep[Bottom]) {
newGeom.moveBottom(qMin(bottomMax, screenArea.bottom()));
newGeom.moveBottom(qMin(bottomMax, screenArea.bottom()) + 1);
}
if (oldGeometry.x() >= oldLeftMax && newGeom.x() < leftMax) {