diff --git a/src/window.cpp b/src/window.cpp index c9965e7530..d3274c151f 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -1248,6 +1248,14 @@ void Window::finishInteractiveMoveResize(bool cancel) setGeometryRestore(m_interactiveMoveResize.initialGeometryRestore); } } else if (moveResizeOutput() != interactiveMoveResizeStartOutput()) { + // TODO: Is there a better place for this? + VirtualDesktop *newOutputDesktop = VirtualDesktopManager::self()->currentDesktop(moveResizeOutput()); + VirtualDesktop *oldOutputDesktop = VirtualDesktopManager::self()->currentDesktop(interactiveMoveResizeStartOutput()); + if (newOutputDesktop != oldOutputDesktop) { + enterDesktop(newOutputDesktop); + leaveDesktop(oldOutputDesktop); + } + sendToOutput(moveResizeOutput()); // checks rule validity if (isRequestedFullScreen() || requestedMaximizeMode() != MaximizeRestore) { checkWorkspacePosition();