Commit 6ba447e9 authored by Roman Gilg's avatar Roman Gilg

fix: transfer tablet mode properties

Summary:
I forgot to copy over the tablet-mode-available and -engaged data from one
config to the next one. Because of that the data was not available to the
daemon.

Also serialize the tablet mode properties in the Serializer. The Serializer
is not used on Wayland afaik but if at one point for example the RandR backend
gains auto rotation support we need to have it in the Serializer.

BUG: 418739

Test Plan: Manually with hard-coded tablet mode availability in KWin.

Reviewers: #plasma, bshah

Reviewed By: #plasma, bshah

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D28106
parent 624ff86e
......@@ -222,6 +222,8 @@ ConfigPtr Config::clone() const
}
newConfig->d->primaryOutput = newConfig->d->findPrimaryOutput();
newConfig->setSupportedFeatures(supportedFeatures());
newConfig->setTabletModeAvailable(tabletModeAvailable());
newConfig->setTabletModeEngaged(tabletModeEngaged());
return newConfig;
}
......
......@@ -68,6 +68,9 @@ QJsonObject ConfigSerializer::serializeConfig(const ConfigPtr &config)
obj[QLatin1String("screen")] = serializeScreen(config->screen());
}
obj[QLatin1String("tabletModeAvailable")] = config->tabletModeAvailable();
obj[QLatin1String("tabletModeEngaged")] = config->tabletModeEngaged();
return obj;
}
......@@ -183,6 +186,13 @@ ConfigPtr ConfigSerializer::deserializeConfig(const QVariantMap &map)
config->setSupportedFeatures(static_cast<Config::Features>(map[QStringLiteral("features")].toInt()));
}
if (map.contains(QLatin1String("tabletModeAvailable"))) {
config->setTabletModeAvailable(map[QStringLiteral("tabletModeAvailable")].toBool());
}
if (map.contains(QLatin1String("tabletModeEngaged"))) {
config->setTabletModeEngaged(map[QStringLiteral("tabletModeEngaged")].toBool());
}
if (map.contains(QLatin1String("outputs"))) {
const QDBusArgument &outputsArg = map[QStringLiteral("outputs")].value<QDBusArgument>();
outputsArg.beginArray();
......
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