From 7b933abc0f49edb033d7c91730bc101fa51c815e Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Tue, 21 Jun 2022 01:46:51 +0200 Subject: [PATCH] backends/wayland: Don't rearrange outputs every time the window is resized It makes it very hard to debug any use-case that isn't a strip of outputs and even then, we should have other mechanisms to arrange outputs properly (i.e. through kscreen). --- src/backends/wayland/wayland_backend.cpp | 18 ------------------ src/backends/wayland/wayland_backend.h | 1 - 2 files changed, 19 deletions(-) diff --git a/src/backends/wayland/wayland_backend.cpp b/src/backends/wayland/wayland_backend.cpp index 296f54c67f..d2374b519d 100644 --- a/src/backends/wayland/wayland_backend.cpp +++ b/src/backends/wayland/wayland_backend.cpp @@ -760,18 +760,6 @@ void WaylandBackend::initConnection() m_connectionThreadObject->initConnection(); } -void WaylandBackend::updateScreenSize(WaylandOutput *output) -{ - auto it = std::find(m_outputs.constBegin(), m_outputs.constEnd(), output); - - int nextLogicalPosition = output->geometry().topRight().x(); - while (++it != m_outputs.constEnd()) { - const QRect geo = (*it)->geometry(); - (*it)->setGeometry(QPoint(nextLogicalPosition, 0), geo.size()); - nextLogicalPosition = geo.topRight().x(); - } -} - KWayland::Client::ServerSideDecorationManager *WaylandBackend::ssdManager() { if (!m_ssdManager) { @@ -835,12 +823,6 @@ WaylandOutput *WaylandBackend::createOutput(const QString &name, const QPoint &p } waylandOutput->init(position, size); - - connect(waylandOutput, &WaylandOutput::sizeChanged, this, [this, waylandOutput](const QSize &size) { - Q_UNUSED(size) - updateScreenSize(waylandOutput); - Compositor::self()->scene()->addRepaintFull(); - }); connect(waylandOutput, &WaylandOutput::frameRendered, this, [waylandOutput]() { waylandOutput->resetRendered(); diff --git a/src/backends/wayland/wayland_backend.h b/src/backends/wayland/wayland_backend.h index 3a6c7681ea..e162fdf25c 100644 --- a/src/backends/wayland/wayland_backend.h +++ b/src/backends/wayland/wayland_backend.h @@ -329,7 +329,6 @@ private: void createOutputs(); void destroyOutputs(); - void updateScreenSize(WaylandOutput *output); WaylandOutput *createOutput(const QString &name, const QPoint &position, const QSize &size); Session *m_session;