Fix reloading animation speed option

Amends 4d2c9f5d88.

Prior to 4d2c9f5d88, the Compositor used
to force the Options to reload settings when starting compositing.

Unfortunately it was overlooked that Options::animationTimeFactor() can
return an old value when the Options::animationSpeedChanged() signal is
emitted. This change addresses that.
This commit is contained in:
Vlad Zahorodnii 2023-10-20 14:32:36 +03:00
parent 3af30c4250
commit f22da5f62a

View file

@ -96,6 +96,7 @@ Options::Options(QObject *parent)
m_configWatcher = KConfigWatcher::create(m_settings->sharedConfig());
connect(m_configWatcher.data(), &KConfigWatcher::configChanged, this, [this](const KConfigGroup &group, const QByteArrayList &names) {
if (group.name() == QLatin1String("KDE") && names.contains(QByteArrayLiteral("AnimationDurationFactor"))) {
m_settings->load();
Q_EMIT animationSpeedChanged();
} else if (group.name() == QLatin1String("Xwayland")) {
workspace()->reconfigure();