mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-23 10:29:49 +01:00
gamma-control-v1: don't insert control in the list before checking unicity
This commit is contained in:
parent
a5cab82a0f
commit
6e8892d4d7
1 changed files with 3 additions and 1 deletions
|
@ -148,7 +148,7 @@ static void gamma_control_manager_get_gamma_control(struct wl_client *client,
|
||||||
gamma_control->output_destroy_listener.notify =
|
gamma_control->output_destroy_listener.notify =
|
||||||
gamma_control_handle_output_destroy;
|
gamma_control_handle_output_destroy;
|
||||||
|
|
||||||
wl_list_insert(&manager->controls, &gamma_control->link);
|
wl_list_init(&gamma_control->link);
|
||||||
|
|
||||||
if (!output->impl->set_gamma) {
|
if (!output->impl->set_gamma) {
|
||||||
zwlr_gamma_control_v1_send_failed(gamma_control->resource);
|
zwlr_gamma_control_v1_send_failed(gamma_control->resource);
|
||||||
|
@ -165,6 +165,8 @@ static void gamma_control_manager_get_gamma_control(struct wl_client *client,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wl_list_remove(&gamma_control->link);
|
||||||
|
wl_list_insert(&manager->controls, &gamma_control->link);
|
||||||
zwlr_gamma_control_v1_send_gamma_size(gamma_control->resource,
|
zwlr_gamma_control_v1_send_gamma_size(gamma_control->resource,
|
||||||
wlr_output_get_gamma_size(output));
|
wlr_output_get_gamma_size(output));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue