git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commit79670935bc7716d8199f11c1b03e1fe9b5f5e0d1
parentc69a873760
authorIsaac Freund <[email protected]>
date2024-06-24 19:29
Output: flag gamma as dirty on enable

We can end up with stale gamma settings if we don't re-check the
current gamma settings for the output on enable.

 river/Output.zig | 1 +
 river/Root.zig   | 1 +
 2 files changed, 2 insertions(+)

diff --git a/river/Output.zig b/river/Output.zig
index b235c1e..518bfc6 100644
--- a/river/Output.zig
+++ b/river/Output.zig
@@ -474,6 +474,7 @@ pub fn applyState(output: *Output, state: *wlr.Output.State) error{CommitFailed}
 
 fn handleEnableDisable(output: *Output) void {
     output.updateLockRenderStateOnEnableDisable();
+    output.gamma_dirty = true;
 
     if (output.wlr_output.enabled) {
         // Add the output to root.active_outputs and the output layout if it has not
diff --git a/river/Root.zig b/river/Root.zig
index 1dc0cba..454c77e 100644
--- a/river/Root.zig
+++ b/river/Root.zig
@@ -894,6 +894,7 @@ fn handlePowerManagerSetMode(
     }
 
     output.updateLockRenderStateOnEnableDisable();
+    output.gamma_dirty = true;
 }
 
 fn handleSetGamma(