From 9807c83929692707fdbae23592c1b4db1a57ac5f Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Mon, 6 Feb 2023 11:56:39 +0200 Subject: [PATCH] {x11,wayland}: Fix restoring fullscreen windows If the window has been originally on another output, make sure that the window will be properly put back on it. This logic seem to originate from 7d673802050ebeb55572b0275416eb87a7c251bc, but it's not necessary anymore because geometry restore will be updated if the window is moved to another output by the user. BUG: 465358 --- src/x11window.cpp | 4 ---- src/xdgshellwindow.cpp | 4 ---- 2 files changed, 8 deletions(-) diff --git a/src/x11window.cpp b/src/x11window.cpp index f39d1d585d..918fa6a398 100644 --- a/src/x11window.cpp +++ b/src/x11window.cpp @@ -4612,11 +4612,7 @@ void X11Window::setFullScreen(bool set, bool user) } } else { Q_ASSERT(!fullscreenGeometryRestore().isNull()); - Output *currentOutput = moveResizeOutput(); moveResize(QRectF(fullscreenGeometryRestore().topLeft(), constrainFrameSize(fullscreenGeometryRestore().size()))); - if (currentOutput != moveResizeOutput()) { - workspace()->sendWindowToOutput(this, currentOutput); - } } updateWindowRules(Rules::Fullscreen | Rules::Position | Rules::Size); diff --git a/src/xdgshellwindow.cpp b/src/xdgshellwindow.cpp index 3b99767136..c205aafab8 100644 --- a/src/xdgshellwindow.cpp +++ b/src/xdgshellwindow.cpp @@ -1618,12 +1618,8 @@ void XdgToplevelWindow::setFullScreen(bool set, bool user) } else { m_fullScreenRequestedOutput.clear(); if (fullscreenGeometryRestore().isValid()) { - Output *currentOutput = moveResizeOutput(); moveResize(QRectF(fullscreenGeometryRestore().topLeft(), constrainFrameSize(fullscreenGeometryRestore().size()))); - if (currentOutput != moveResizeOutput()) { - workspace()->sendWindowToOutput(this, currentOutput); - } } else { // this can happen when the window was first shown already fullscreen, // so let the client set the size by itself