Paste P372

Masterwork From Distant Lands
ActivePublic

Authored by apol on Apr 15 2019, 1:51 PM.
diff --git a/abstract_output.cpp b/abstract_output.cpp
index e2f1598e2..bf376dc42 100644
--- a/abstract_output.cpp
+++ b/abstract_output.cpp
@@ -104,7 +104,6 @@ void AbstractOutput::setScale(qreal scale)
m_xdgOutput->setLogicalSize(pixelSize() / m_scale);
m_xdgOutput->done();
}
- emit modeChanged();
}
void AbstractOutput::setChanges(KWayland::Server::OutputChangeSet *changes)
@@ -163,6 +162,7 @@ void AbstractOutput::setWaylandMode(const QSize &size, int refreshRate)
m_xdgOutput->setLogicalSize(pixelSize() / scale());
m_xdgOutput->done();
}
+ emit modeChanged();
}
void AbstractOutput::createXdgOutput()
diff --git a/abstract_output.h b/abstract_output.h
index dc9074582..6a9b4602f 100644
--- a/abstract_output.h
+++ b/abstract_output.h
@@ -181,7 +181,7 @@ private:
KWayland::Server::OutputInterface::DpmsMode m_dpms = KWayland::Server::OutputInterface::DpmsMode::On;
QPoint m_globalPos;
- qreal m_scale = 0;
+ qreal m_scale = 1;
QSize m_physicalSize;
Qt::ScreenOrientation m_orientation = Qt::PrimaryOrientation;
bool m_internal = false;
diff --git a/plugins/platforms/drm/drm_backend.cpp b/plugins/platforms/drm/drm_backend.cpp
index 39138cb40..9636950c0 100644
--- a/plugins/platforms/drm/drm_backend.cpp
+++ b/plugins/platforms/drm/drm_backend.cpp
@@ -514,8 +514,10 @@ void DrmBackend::readOutputsConfiguration()
const auto outputConfig = configGroup.group((*it)->uuid());
(*it)->setGlobalPos(outputConfig.readEntry<QPoint>("Position", pos));
// TODO: add mode
- if (outputConfig.hasKey("Scale") || (*it)->scale() == 0)
+ if (outputConfig.hasKey("Scale"))
(*it)->setScale(outputConfig.readEntry("Scale", 1.0));
+ else
+ (*it)->setWaylandMode();
pos.setX(pos.x() + (*it)->geometry().width());
}
}
apol edited the content of this paste. (Show Details)Apr 15 2019, 1:51 PM
apol changed the title of this paste from untitled to Masterwork From Distant Lands.