mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-23 02:19:49 +01:00
gamma-control-v1: fix handling of duplicate control
When a new client comes in and tries to create a zwlr_gamma_control_v1 object for an output which already has one, we were destroying the old object and early-returning. The early return causes the new object to not be set up properly: it's not inserted in the list and doesn't get the gamma_size event. Fix this by destroying the new object, and leave the old object intact, which is what was the intent I think. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3605
This commit is contained in:
parent
3a200aa279
commit
9108717d5d
1 changed files with 2 additions and 2 deletions
|
@ -219,8 +219,8 @@ static void gamma_control_manager_get_gamma_control(struct wl_client *client,
|
|||
struct wlr_gamma_control_v1 *gc;
|
||||
wl_list_for_each(gc, &manager->controls, link) {
|
||||
if (gc->output == output) {
|
||||
zwlr_gamma_control_v1_send_failed(gc->resource);
|
||||
gamma_control_destroy(gc);
|
||||
zwlr_gamma_control_v1_send_failed(gamma_control->resource);
|
||||
gamma_control_destroy(gamma_control);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue