From e8ae03d799cb304d9eb4bab872b4b7fbdbd93c28 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 15 Mar 2024 23:17:26 +0200 Subject: [PATCH] Make some Window::updateInteractiveMoveResize() code less misleading The "!isMovable()" code path is needed to handle moving fullscreen windows. Maximized windows are movable and their geometry is computed in Window::nextInteractiveMoveGeometry(). --- src/window.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/window.cpp b/src/window.cpp index 5df971c2fa..b53ebf5006 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -1404,20 +1404,8 @@ void Window::updateInteractiveMoveResize(const QPointF &global) Q_EMIT interactiveMoveResizeStepped(nextMoveResizeGeom); } } else if (isInteractiveMove()) { - if (!isMovable()) { // isMovableAcrossScreens() must have been true to get here - // Special moving of maximized windows on Xinerama screens - Output *output = workspace()->outputAt(global); - if (isRequestedFullScreen()) { - nextMoveResizeGeom = workspace()->clientArea(FullScreenArea, this, output); - } else { - nextMoveResizeGeom = workspace()->clientArea(MaximizeArea, this, output); - const QSizeF adjSize = constrainFrameSize(nextMoveResizeGeom.size(), SizeModeMax); - if (adjSize != nextMoveResizeGeom.size()) { - QRectF r(nextMoveResizeGeom); - nextMoveResizeGeom.setSize(adjSize); - nextMoveResizeGeom.moveCenter(r.center()); - } - } + if (isRequestedFullScreen()) { + nextMoveResizeGeom = workspace()->clientArea(FullScreenArea, this, global); } else { nextMoveResizeGeom = nextInteractiveMoveGeometry(global); }