mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-22 18:09:49 +01:00
scene: add wlr_scene_output.events.destroy
This commit is contained in:
parent
ec328ca8cc
commit
d3bc17d5d1
2 changed files with 8 additions and 0 deletions
|
@ -164,6 +164,10 @@ struct wlr_scene_output {
|
|||
|
||||
int x, y;
|
||||
|
||||
struct {
|
||||
struct wl_signal destroy;
|
||||
} events;
|
||||
|
||||
// private state
|
||||
|
||||
uint8_t index;
|
||||
|
|
|
@ -999,6 +999,8 @@ struct wlr_scene_output *wlr_scene_output_create(struct wlr_scene *scene,
|
|||
assert(scene_output->index < 64);
|
||||
wl_list_insert(prev_output_link, &scene_output->link);
|
||||
|
||||
wl_signal_init(&scene_output->events.destroy);
|
||||
|
||||
scene_output->output_commit.notify = scene_output_handle_commit;
|
||||
wl_signal_add(&output->events.commit, &scene_output->output_commit);
|
||||
|
||||
|
@ -1035,6 +1037,8 @@ void wlr_scene_output_destroy(struct wlr_scene_output *scene_output) {
|
|||
return;
|
||||
}
|
||||
|
||||
wlr_signal_emit_safe(&scene_output->events.destroy, NULL);
|
||||
|
||||
scene_node_remove_output(&scene_output->scene->tree.node, scene_output);
|
||||
|
||||
wlr_addon_finish(&scene_output->addon);
|
||||
|
|
Loading…
Reference in a new issue