Revert "use wlr_scene_output_build_state() to set gamma"
This reverts commit 65f68e7643
.
This commit is contained in:
parent
1e1811f953
commit
6095ff84d2
19
dwl.c
19
dwl.c
|
@ -2061,26 +2061,15 @@ void
|
||||||
setgamma(struct wl_listener *listener, void *data)
|
setgamma(struct wl_listener *listener, void *data)
|
||||||
{
|
{
|
||||||
struct wlr_gamma_control_manager_v1_set_gamma_event *event = data;
|
struct wlr_gamma_control_manager_v1_set_gamma_event *event = data;
|
||||||
Monitor *m = event->output->data;
|
if (!wlr_gamma_control_v1_apply(event->control, &event->output->pending))
|
||||||
struct wlr_output_state pending = {0};
|
|
||||||
if (!m)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!wlr_scene_output_build_state(m->scene_output, &pending))
|
if (!wlr_output_test(event->output)) {
|
||||||
return;
|
wlr_output_rollback(event->output);
|
||||||
|
|
||||||
if (!wlr_gamma_control_v1_apply(event->control, &pending))
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
if (!wlr_output_commit_state(m->wlr_output, &pending)) {
|
|
||||||
wlr_gamma_control_v1_send_failed_and_destroy(event->control);
|
wlr_gamma_control_v1_send_failed_and_destroy(event->control);
|
||||||
goto out;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wlr_damage_ring_rotate(&m->scene_output->damage_ring);
|
wlr_output_schedule_frame(event->output);
|
||||||
|
|
||||||
out:
|
|
||||||
wlr_output_state_finish(&pending);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue