|
|
@ -207,13 +207,10 @@ static void gamma_control_manager_get_gamma_control(struct wl_client *client,
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
struct wlr_gamma_control_v1 *gc;
|
|
|
|
if (wlr_gamma_control_manager_v1_get_control(manager, output) != NULL) {
|
|
|
|
wl_list_for_each(gc, &manager->controls, link) {
|
|
|
|
|
|
|
|
if (gc->output == output) {
|
|
|
|
|
|
|
|
zwlr_gamma_control_v1_send_failed(resource);
|
|
|
|
zwlr_gamma_control_v1_send_failed(resource);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct wlr_gamma_control_v1 *gamma_control =
|
|
|
|
struct wlr_gamma_control_v1 *gamma_control =
|
|
|
|
calloc(1, sizeof(struct wlr_gamma_control_v1));
|
|
|
|
calloc(1, sizeof(struct wlr_gamma_control_v1));
|
|
|
@ -299,3 +296,14 @@ struct wlr_gamma_control_manager_v1 *wlr_gamma_control_manager_v1_create(
|
|
|
|
|
|
|
|
|
|
|
|
return manager;
|
|
|
|
return manager;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct wlr_gamma_control_v1 *wlr_gamma_control_manager_v1_get_control(
|
|
|
|
|
|
|
|
struct wlr_gamma_control_manager_v1 *manager, struct wlr_output *output) {
|
|
|
|
|
|
|
|
struct wlr_gamma_control_v1 *gamma_control;
|
|
|
|
|
|
|
|
wl_list_for_each(gamma_control, &manager->controls, link) {
|
|
|
|
|
|
|
|
if (gamma_control->output == output) {
|
|
|
|
|
|
|
|
return gamma_control;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
}
|
|
|
|