From 3529463569d4e7f8f9a7510ab11292e91b1c9a4a Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Thu, 24 Oct 2024 10:55:44 +0200 Subject: [PATCH] Output: workaround wlroots headless output bug --- river/Output.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/river/Output.zig b/river/Output.zig index be6a5bb..9a5b94e 100644 --- a/river/Output.zig +++ b/river/Output.zig @@ -547,7 +547,9 @@ fn renderAndCommit(output: *Output, scene_output: *wlr.SceneOutput) !void { const control = server.root.gamma_control_manager.getControl(output.wlr_output); if (!wlr.GammaControlV1.apply(control, &state)) return error.OutOfMemory; - if (!output.wlr_output.testState(&state)) { + // TODO(wlroots): remove this isHeadless() workaround after upstream fix is available + // in a release: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4868 + if (!output.wlr_output.testState(&state) or output.wlr_output.isHeadless()) { wlr.GammaControlV1.sendFailedAndDestroy(control); state.clearGammaLut(); // If the backend does not support gamma LUTs it will reject any