Fix layer shell subsurface use after free

This occurs when a layer surface is destroyed , prompting an unmap event
for all its children subsurfaces (if it has any). Since this happens after
the parent surface is destroyed, any pointers to it will become dangling.
This commit is contained in:
Vlad Pănăzan 2020-12-13 18:32:04 +02:00
parent 1dbb699036
commit 53e4a88bdb
2 changed files with 18 additions and 0 deletions

View file

@ -48,6 +48,7 @@ struct sway_layer_subsurface {
struct wl_listener unmap;
struct wl_listener destroy;
struct wl_listener commit;
struct wl_listener layer_surface_destroy;
};
struct sway_output;