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 fb19e12c authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Follow the preferred mode if we're asked to (i.e. if under QXL)

Summary:
As described in D15789, follow the preferred mode when the backend
asks us to.

Test Plan: tested together with the libkscreen patch

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D15790
parent a33b6c1c
......@@ -101,6 +101,7 @@ void Console::printConfig()
qDebug() << "Rotation: " << output->rotation();
qDebug() << "Pos: " << output->pos();
qDebug() << "MMSize: " << output->sizeMm();
qDebug() << "FollowPreferredMode: " << output->followPreferredMode();
if (output->currentMode()) {
qDebug() << "Size: " << output->size();
}
......
......@@ -224,7 +224,6 @@ void KScreenDaemon::applyOsdAction(KScreen::OsdAction::Action action)
void KScreenDaemon::applyIdealConfig()
{
if (m_monitoredConfig->connectedOutputs().count() < 2) {
m_osdManager->hideOsd();
doApplyConfig(Generator::self()->idealConfig(m_monitoredConfig));
......@@ -254,8 +253,8 @@ void KScreenDaemon::configChanged()
// 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();
if (output->isConnected() && output->isEnabled() && (output->currentMode().isNull() || (output->followPreferredMode() && output->currentModeId() != output->preferredModeId()))) {
qCDebug(KSCREEN_KDED) << "Current mode was" << output->currentModeId() << ", setting preferred mode" << output->preferredModeId();
output->setCurrentModeId(output->preferredModeId());
changed = true;
}
......
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