From 4fc6a5bd51057718718f0510199a1c4a4e580e8e Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Wed, 14 Aug 2024 01:32:02 +0200 Subject: [PATCH] wayland/xx colormanagement: don't clamp primaries to 1 The range of values is [0, 10'000], clamping to 1 just makes all primaries 1 --- src/wayland/xx_colormanagement_v4.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wayland/xx_colormanagement_v4.cpp b/src/wayland/xx_colormanagement_v4.cpp index 1e55d9a6cd..a227ead3eb 100644 --- a/src/wayland/xx_colormanagement_v4.cpp +++ b/src/wayland/xx_colormanagement_v4.cpp @@ -381,7 +381,7 @@ void XXImageDescriptionV4::xx_image_description_v4_get_information(Resource *qtR auto resource = wl_resource_create(qtResource->client(), &xx_image_description_info_v4_interface, qtResource->version(), information); const auto c = m_description.containerColorimetry(); const auto round = [](float f) { - return std::clamp(std::round(f * 10'000.0), 0.0, 1.0); + return std::clamp(std::round(f * 10'000.0), 0.0, 10'000.0); }; xx_image_description_info_v4_send_primaries(resource, round(c.red().x()), round(c.red().y()),