From 3cf0280b11f370c11e6839275e547779a33f4a19 Mon Sep 17 00:00:00 2001 From: UjinT34 <41110182+UjinT34@users.noreply.github.com> Date: Wed, 3 Dec 2025 04:30:43 +0300 Subject: renderer: add quirks:prefer_hdr to fix HDR activation for some clients (#12436) --- src/protocols/core/Compositor.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/protocols/core') diff --git a/src/protocols/core/Compositor.cpp b/src/protocols/core/Compositor.cpp index 541eae92..efdbff50 100644 --- a/src/protocols/core/Compositor.cpp +++ b/src/protocols/core/Compositor.cpp @@ -557,6 +557,10 @@ void CWLSurfaceResource::commitState(SSurfaceState& state) { } SImageDescription CWLSurfaceResource::getPreferredImageDescription() { + static const auto PFORCE_HDR = CConfigValue("quirks:prefer_hdr"); + if (*PFORCE_HDR == 1 || (*PFORCE_HDR == 2 && m_hlSurface && m_hlSurface->getWindow() && m_hlSurface->getWindow()->m_class == "gamescope")) + return g_pCompositor->getHDRImageDescription(); + auto parent = m_self; if (parent->m_role->role() == SURFACE_ROLE_SUBSURFACE) { auto subsurface = sc(parent->m_role.get())->m_subsurface.lock(); -- cgit v1.2.3