x11: Fix interactive move offset

Only the y component has to be divided by height(), not the whole QPointF()
expression.
This commit is contained in:
Vlad Zahorodnii 2024-03-12 23:56:26 +02:00
parent b2babac3d0
commit fa4635e570

View file

@ -1323,7 +1323,7 @@ void X11Window::NETMoveResize(qreal x_root, qreal y_root, NET::Direction directi
finishInteractiveMoveResize(false); finishInteractiveMoveResize(false);
} }
setInteractiveMoveResizePointerButtonDown(true); setInteractiveMoveResizePointerButtonDown(true);
setInteractiveMoveOffset(QPointF(qreal(x_root - x()) / width(), qreal(y_root - y())) / height()); // map from global setInteractiveMoveOffset(QPointF(qreal(x_root - x()) / width(), qreal(y_root - y()) / height())); // map from global
setUnrestrictedInteractiveMoveResize(false); setUnrestrictedInteractiveMoveResize(false);
setInteractiveMoveResizeGravity(convert[direction]); setInteractiveMoveResizeGravity(convert[direction]);
if (!startInteractiveMoveResize()) { if (!startInteractiveMoveResize()) {