backends/drm: Don't sort DrmBackend::m_outputs

This std::sort() function traces its origin back to
cbbd684430. The sort step was necessary to
ensure that we get same configuration hash regardless the order in which
outputs were connected.

On the other hand, our KWinKScreenIntegration code already does that so
it seems excessive to sort outputs the second time.
This commit is contained in:
Vlad Zahorodnii 2022-09-06 17:54:52 +03:00
parent d8ea87a9ea
commit 9c4bcb92c3

View file

@ -341,17 +341,6 @@ void DrmBackend::updateOutputs()
}
}
std::sort(m_outputs.begin(), m_outputs.end(), [](DrmAbstractOutput *a, DrmAbstractOutput *b) {
auto da = qobject_cast<DrmOutput *>(a);
auto db = qobject_cast<DrmOutput *>(b);
if (da && !db) {
return true;
} else if (da && db) {
return da->pipeline()->connector()->id() < db->pipeline()->connector()->id();
} else {
return false;
}
});
Q_EMIT screensQueried();
}