Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 05ebba6b authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Don't apply configs in a loop

Summary:
Loop through all the changed bits then apply at once. It should trigger
less unnecessary visual changes.

Test Plan:
Restarted kded5, restarted the computer too at some point.
Connected and disconnected displays.

Reviewers: broulik

Reviewed By: broulik

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D15767
parent c84af0b7
......@@ -252,13 +252,17 @@ void KScreenDaemon::configChanged()
logConfig(m_monitoredConfig);
// Modes may have changed, fix-up current mode id
bool changed = false;
Q_FOREACH(const KScreen::OutputPtr &output, m_monitoredConfig->outputs()) {
if (output->isConnected() && output->isEnabled() && output->currentMode().isNull()) {
qCDebug(KSCREEN_KDED) << "Current mode" << output->currentModeId() << "invalid, setting preferred mode" << output->preferredModeId();
output->setCurrentModeId(output->preferredModeId());
doApplyConfig(m_monitoredConfig);
changed = true;
}
}
if (changed) {
doApplyConfig(m_monitoredConfig);
}
// Reset timer, delay the writeback
if (!m_saveTimer) {
......
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