Destroy Sway subsurfaces when destroying Sway layer_surface

Otherwise destroying wlr_layer_surface could destroy sway_layer_surface
before destroying its subsurfaces that would try to access the
sway_layer_surface regardless, possibly crashing Sway.
This commit is contained in:
numzero 2021-08-05 00:35:17 +03:00
parent f4cda5157e
commit da34ef8dd4
2 changed files with 26 additions and 5 deletions

View file

@ -21,6 +21,10 @@ struct sway_layer_surface {
struct wl_listener new_popup;
struct wl_listener new_subsurface;
struct {
struct wl_signal destroy;
} events;
struct wlr_box geo;
enum zwlr_layer_shell_v1_layer layer;
};
@ -47,6 +51,7 @@ struct sway_layer_subsurface {
struct wl_listener unmap;
struct wl_listener destroy;
struct wl_listener commit;
struct wl_listener surface_destroy;
};
struct sway_output;