[platforms/x11/windowed] Fix output scale access before output device creation

This commit is contained in:
Roman Gilg 2019-08-28 22:27:22 +02:00
parent 6d792de74b
commit 836f88495b

View file

@ -57,10 +57,9 @@ void X11WindowedOutput::init(const QPoint &logicalPosition, const QSize &pixelSi
// Physicial size must be adjusted, such that QPA calculates correct sizes of
// internal elements.
const QSize physicalSize = pixelSize / 96.0 * 25.4 / scale();
const QSize physicalSize = pixelSize / 96.0 * 25.4 / m_backend->initialOutputScale();
AbstractWaylandOutput::initWaylandOutputDevice("model_TODO", "manufacturer_TODO",
"UUID_TODO", physicalSize, { mode });
setEnabled(true);
setGeometry(logicalPosition, pixelSize);
setScale(m_backend->initialOutputScale());