Fix Wayland object leaks when outputs are destroyed
This commit is contained in:
parent
2018673e1d
commit
10df946671
8
main.c
8
main.c
@ -97,12 +97,18 @@ static void destroy_surface(struct swaylock_surface *surface) {
|
||||
if (surface->ext_session_lock_surface_v1 != NULL) {
|
||||
ext_session_lock_surface_v1_destroy(surface->ext_session_lock_surface_v1);
|
||||
}
|
||||
if (surface->subsurface) {
|
||||
wl_subsurface_destroy(surface->subsurface);
|
||||
}
|
||||
if (surface->child) {
|
||||
wl_surface_destroy(surface->child);
|
||||
}
|
||||
if (surface->surface != NULL) {
|
||||
wl_surface_destroy(surface->surface);
|
||||
}
|
||||
destroy_buffer(&surface->indicator_buffers[0]);
|
||||
destroy_buffer(&surface->indicator_buffers[1]);
|
||||
wl_output_destroy(surface->output);
|
||||
wl_output_release(surface->output);
|
||||
free(surface);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user