Commit 8719c33e authored by Sebastian Kügler's avatar Sebastian Kügler

track the config to monitor, save scale

Summary:
When doApplyConfig is called, we forgot to change the monitored config,
which means we weren't tracking changes anymore. This patch makes sure
that the new config becomes the monitored one in that case.

Also, save the scale property to the json config, we forgot to do that.

CCBUG:384733

Test Plan: Scale changes through kwin are now saved, they weren't before

Reviewers: davidedmundson

Reviewed By: davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D7912
parent abfffbb2
......@@ -140,6 +140,9 @@ void KScreenDaemon::doApplyConfig(const KScreen::ConfigPtr& config)
{
qCDebug(KSCREEN_KDED) << "doApplyConfig()";
setMonitorForChanges(false);
KScreen::ConfigMonitor::instance()->removeConfig(m_monitoredConfig);
m_monitoredConfig = config;
KScreen::ConfigMonitor::instance()->addConfig(m_monitoredConfig);
connect(new KScreen::SetConfigOperation(config), &KScreen::SetConfigOperation::finished, this,
[&]() {
......
......@@ -154,6 +154,7 @@ bool Serializer::saveConfig(const KScreen::ConfigPtr &config, const QString &con
info[QStringLiteral("primary")] = output->isPrimary();
info[QStringLiteral("enabled")] = output->isEnabled();
info[QStringLiteral("rotation")] = output->rotation();
info[QStringLiteral("scale")] = output->scale();
QVariantMap pos;
pos[QStringLiteral("x")] = output->pos().x();
......
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