Commit 7b933abc authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Aleix Pol Gonzalez
Browse files

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).
parent 5490b001
Pipeline #193789 passed with stage
in 39 minutes and 17 seconds
......@@ -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();
......
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment