summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@proton.me>2023-06-23 13:30:43 -0600
committerLeonardo Hernández Hernández <leohdz172@proton.me>2023-06-23 13:30:43 -0600
commit6095ff84d2f8141f5bcedb41af75c95109e24fdf (patch)
treed36f8d26060c858fa6fc2e57c75484132495e78d
parent1e1811f95368c0848ba13137452153e01862c301 (diff)
Revert "use wlr_scene_output_build_state() to set gamma"
This reverts commit 65f68e76437275a0c1c25279af646f726e213b6d.
-rw-r--r--dwl.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/dwl.c b/dwl.c
index 3c2f2f6..2a16ef7 100644
--- a/dwl.c
+++ b/dwl.c
@@ -2061,26 +2061,15 @@ void
setgamma(struct wl_listener *listener, void *data)
{
struct wlr_gamma_control_manager_v1_set_gamma_event *event = data;
- Monitor *m = event->output->data;
- struct wlr_output_state pending = {0};
- if (!m)
+ if (!wlr_gamma_control_v1_apply(event->control, &event->output->pending))
return;
- if (!wlr_scene_output_build_state(m->scene_output, &pending))
- return;
-
- if (!wlr_gamma_control_v1_apply(event->control, &pending))
- goto out;
-
- if (!wlr_output_commit_state(m->wlr_output, &pending)) {
+ if (!wlr_output_test(event->output)) {
+ wlr_output_rollback(event->output);
wlr_gamma_control_v1_send_failed_and_destroy(event->control);
- goto out;
}
- wlr_damage_ring_rotate(&m->scene_output->damage_ring);
-
-out:
- wlr_output_state_finish(&pending);
+ wlr_output_schedule_frame(event->output);
}
void