aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-01-10 18:15:04 +0100
committerSimon Ser <contact@emersion.fr>2021-01-10 18:40:08 +0100
commit4f80fab337f10b4ad2043b834606540895b8df36 (patch)
tree8ede59f5e2975c3e942476b9c88dddfe66df6d40
parentedf5082a4cb41a9e9f1146835f84020c283cdd09 (diff)
gamma-control-v1: schedule frame when resetting gamma LUT
Closes: https://github.com/swaywm/wlroots/issues/2632
-rw-r--r--types/wlr_gamma_control_v1.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/types/wlr_gamma_control_v1.c b/types/wlr_gamma_control_v1.c
index 2fdaaaab..095b4a6f 100644
--- a/types/wlr_gamma_control_v1.c
+++ b/types/wlr_gamma_control_v1.c
@@ -21,7 +21,11 @@ static void gamma_control_destroy(struct wlr_gamma_control_v1 *gamma_control) {
if (gamma_control == NULL) {
return;
}
+
wlr_output_set_gamma(gamma_control->output, 0, NULL, NULL, NULL);
+ // Gamma LUT will be applied on next output commit
+ wlr_output_schedule_frame(gamma_control->output);
+
wl_resource_set_user_data(gamma_control->resource, NULL);
wl_list_remove(&gamma_control->output_destroy_listener.link);
wl_list_remove(&gamma_control->output_commit_listener.link);