{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 7d67380205,
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
This commit is contained in:
Vlad Zahorodnii 2023-02-06 11:56:39 +02:00
parent a648553be0
commit 9807c83929
2 changed files with 0 additions and 8 deletions

View file

@ -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);

View file

@ -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