Commit e0c965d3 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Aleix Pol Gonzalez

Do not re-read output configuration if the outputs didn't change

They would override KScreen in case we were using a dock station that
brings 2 displays.
We'd get:
- udev: event for the first hotplughed screen
- kwin: process all screens properly (both)
- kscreen: would offer the right configuration for such displays
- udev: process the event for the second hotplug udev event
- kwin: restore the configuration
- kscreen: would think this is a conscious decision and embrace it as a
configuration

With this change we are only re-reading the configuration in case the
outputs changed.
parent f9becf80
......@@ -341,11 +341,14 @@ bool DrmBackend::updateOutputs()
if (m_gpus.size() == 0) {
return false;
}
const auto oldOutputs = m_outputs;
for (auto gpu : m_gpus)
gpu->updateOutputs();
std::sort(m_outputs.begin(), m_outputs.end(), [] (DrmOutput *a, DrmOutput *b) { return a->m_conn->id() < b->m_conn->id(); });
readOutputsConfiguration();
if (oldOutputs != m_outputs) {
readOutputsConfiguration();
}
updateOutputsEnabled();
if (!m_outputs.isEmpty()) {
emit screensQueried();
......
......@@ -352,7 +352,7 @@ void DrmOutput::initEdid(drmModeConnector *connector)
}
}
if (!edid) {
qDebug() << "could not find edid for connector" << connector << connector->connector_id;
qCWarning(KWIN_DRM) << "Could not find edid for connector" << connector << connector->connector_id;
return;
}
......
Markdown is supported
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