From 817d13d8c028288de732e32e3825e470149e0c3c Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 14 Sep 2022 10:23:06 +0200 Subject: [PATCH] Ensure move() calls in placement move in integer values Otherwise we run the risk of placing windows at floating coodinates, which leads to interpolated rendering which doesn't look nice. BUG: 457143 --- src/placement.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/placement.cpp b/src/placement.cpp index 60a0956bf6..5e34d791de 100644 --- a/src/placement.cpp +++ b/src/placement.cpp @@ -539,7 +539,7 @@ void Placement::placeUnderMouse(Window *c, const QRect &area, PlacementPolicy /* QRectF geom = c->frameGeometry(); geom.moveCenter(Cursors::self()->mouse()->pos()); - c->move(geom.topLeft()); + c->move(geom.topLeft().toPoint()); c->keepInArea(area); // make sure it's kept inside workarea } @@ -668,7 +668,7 @@ void Window::packTo(qreal left, qreal top) workspace()->updateFocusMousePosition(Cursors::self()->mouse()->pos()); // may cause leave event; const Output *oldOutput = moveResizeOutput(); - move(QPointF(left, top)); + move(QPoint(left, top)); if (moveResizeOutput() != oldOutput) { workspace()->sendWindowToOutput(this, moveResizeOutput()); // checks rule validity if (requestedMaximizeMode() != MaximizeRestore) {