sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 73c244fb4807a29c6599d42c15e8a8759225b2d6
parent b3dcde8d69c3f1304b076968a7a64f54d0c958be
Author: Kenny Levinsen <kl@kl.wtf>
Date:   Fri, 22 Aug 2025 15:37:44 +0200

config/output: Only error when enabling HDR

We currently emit errors about HDR support even if HDR is not being
requested, which mean errors on every regular modeset when monitors not
supporting HDR are connected.

Only emit errors when attempting to enable HDR on such device.

Diffstat:
Msway/config/output.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sway/config/output.c b/sway/config/output.c @@ -365,7 +365,7 @@ bool output_supports_hdr(struct wlr_output *output, const char **unsupported_rea static void set_hdr(struct wlr_output *output, struct wlr_output_state *pending, bool enabled) { const char *unsupported_reason = NULL; - if (!output_supports_hdr(output, &unsupported_reason)) { + if (enabled && !output_supports_hdr(output, &unsupported_reason)) { sway_log(SWAY_ERROR, "Cannot enable HDR on output %s: %s", output->name, unsupported_reason); enabled = false;