wlr_scene: Add output_enter/output_leave signals

When we destroy a scene buffer, let's make sure that we call
output_leave signals before we finish the node which will call destroy
listeners.
This commit is contained in:
Alexander Orzechowski 2022-05-18 18:08:35 -04:00
parent 6ddb9e51bd
commit c46b53d0b0
2 changed files with 128 additions and 46 deletions

View file

@ -111,8 +111,14 @@ struct wlr_scene_buffer {
// May be NULL
struct wlr_buffer *buffer;
struct {
struct wl_signal output_enter; // struct wlr_scene_output
struct wl_signal output_leave; // struct wlr_scene_output
} events;
// private state
uint64_t active_outputs;
struct wlr_texture *texture;
struct wlr_fbox src_box;
int dst_width, dst_height;
@ -132,6 +138,7 @@ struct wlr_scene_output {
// private state
uint8_t index;
bool prev_scanout;
};