Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/drm_output.cpp
Show First 20 Lines • Show All 297 Lines • ▼ Show 20 Line(s) | 297 | [this] { | |||
---|---|---|---|---|---|
298 | connect(screens()->orientationSensor(), &OrientationSensor::orientationChanged, this, &DrmOutput::automaticRotation); | 298 | connect(screens()->orientationSensor(), &OrientationSensor::orientationChanged, this, &DrmOutput::automaticRotation); | ||
299 | } | 299 | } | ||
300 | ); | 300 | ); | ||
301 | } | 301 | } | ||
302 | 302 | | |||
303 | QSize physicalSize = !m_edid.physicalSize.isEmpty() ? m_edid.physicalSize : QSize(connector->mmWidth, connector->mmHeight); | 303 | QSize physicalSize = !m_edid.physicalSize.isEmpty() ? m_edid.physicalSize : QSize(connector->mmWidth, connector->mmHeight); | ||
304 | // the size might be completely borked. E.g. Samsung SyncMaster 2494HS reports 160x90 while in truth it's 520x292 | 304 | // the size might be completely borked. E.g. Samsung SyncMaster 2494HS reports 160x90 while in truth it's 520x292 | ||
305 | // as this information is used to calculate DPI info, it's going to result in everything being huge | 305 | // as this information is used to calculate DPI info, it's going to result in everything being huge | ||
306 | const QByteArray unknown = QByteArrayLiteral("unkown"); | 306 | const QByteArray unknown = QByteArrayLiteral("unknown"); | ||
307 | KConfigGroup group = kwinApp()->config()->group("EdidOverwrite").group(m_edid.eisaId.isEmpty() ? unknown : m_edid.eisaId) | 307 | KConfigGroup group = kwinApp()->config()->group("EdidOverwrite").group(m_edid.eisaId.isEmpty() ? unknown : m_edid.eisaId) | ||
308 | .group(m_edid.monitorName.isEmpty() ? unknown : m_edid.monitorName) | 308 | .group(m_edid.monitorName.isEmpty() ? unknown : m_edid.monitorName) | ||
309 | .group(m_edid.serialNumber.isEmpty() ? unknown : m_edid.serialNumber); | 309 | .group(m_edid.serialNumber.isEmpty() ? unknown : m_edid.serialNumber); | ||
310 | if (group.hasKey("PhysicalSize")) { | 310 | if (group.hasKey("PhysicalSize")) { | ||
311 | const QSize overwriteSize = group.readEntry("PhysicalSize", physicalSize); | 311 | const QSize overwriteSize = group.readEntry("PhysicalSize", physicalSize); | ||
312 | qCWarning(KWIN_DRM) << "Overwriting monitor physical size for" << m_edid.eisaId << "/" << m_edid.monitorName << "/" << m_edid.serialNumber << " from " << physicalSize << "to " << overwriteSize; | 312 | qCWarning(KWIN_DRM) << "Overwriting monitor physical size for" << m_edid.eisaId << "/" << m_edid.monitorName << "/" << m_edid.serialNumber << " from " << physicalSize << "to " << overwriteSize; | ||
313 | physicalSize = overwriteSize; | 313 | physicalSize = overwriteSize; | ||
314 | } | 314 | } | ||
▲ Show 20 Lines • Show All 984 Lines • Show Last 20 Lines |