From d81b106c1554a36c14c55d81083268a79b057a91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9ven=20Car?= Date: Fri, 31 Dec 2021 09:55:34 +0100 Subject: [PATCH] Apply the rgbrange read from Kscreen configuration on startup CCBUG: 442520 --- src/abstract_wayland_output.cpp | 1 + src/backends/drm/drm_backend.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/abstract_wayland_output.cpp b/src/abstract_wayland_output.cpp index a8634db9a5..46509ff4c3 100644 --- a/src/abstract_wayland_output.cpp +++ b/src/abstract_wayland_output.cpp @@ -158,6 +158,7 @@ void AbstractWaylandOutput::applyChanges(const WaylandOutputConfig &config) moveTo(props->pos); setScale(props->scale); setVrrPolicy(props->vrrPolicy); + setRgbRangeInternal(props->rgbRange); Q_EMIT changed(); } diff --git a/src/backends/drm/drm_backend.cpp b/src/backends/drm/drm_backend.cpp index c4e6736bd4..1bfd7066ca 100644 --- a/src/backends/drm/drm_backend.cpp +++ b/src/backends/drm/drm_backend.cpp @@ -462,6 +462,10 @@ void DrmBackend::readOutputsConfiguration(const QVector &out } props->transform = KWinKScreenIntegration::toDrmTransform(outputInfo["rotation"].toInt()); + props->overscan = static_cast(outputInfo["overscan"].toInt(props->overscan)); + props->vrrPolicy = static_cast(outputInfo["vrrpolicy"].toInt(static_cast(props->vrrPolicy))); + props->rgbRange = static_cast(outputInfo["rgbrange"].toInt(static_cast(props->rgbRange))); + if (const QJsonObject mode = outputInfo["mode"].toObject(); !mode.isEmpty()) { const QJsonObject size = mode["size"].toObject(); props->modeSize = QSize(size["width"].toInt(), size["height"].toInt());