mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-25 06:05:58 +01:00
scene: ignore duplicate wlr_scene_output_layout_add_output() calls
An assert was added in [1] to avoid tracking the same output multiple times. However, this is cumbersome for compositors [2]: they need to add a special check for this. Additionally, this is inconsistent with wlr_output_layout_add(). [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4380 [2]: https://github.com/cage-kiosk/cage/pull/315
This commit is contained in:
parent
842093bb84
commit
431e8a7fd7
1 changed files with 3 additions and 1 deletions
|
@ -75,7 +75,9 @@ void wlr_scene_output_layout_add_output(struct wlr_scene_output_layout *sol,
|
|||
|
||||
struct wlr_scene_output_layout_output *solo;
|
||||
wl_list_for_each(solo, &sol->outputs, link) {
|
||||
assert(solo->scene_output != so);
|
||||
if (solo->scene_output == so) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
solo = calloc(1, sizeof(*solo));
|
||||
|
|
Loading…
Reference in a new issue