mirror of
https://github.com/brl/mutter.git
synced 2025-03-03 11:58:09 +00:00
wayland: free framebuffer's shell surface on destroy
This prevents leaking the Wayland shell surface associated with a Cogl OnScreen when it is finalised. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 760fc9f3af5475530262b82a55df311fceca358a)
This commit is contained in:
parent
afbb13e1a4
commit
4327b7a364
@ -375,12 +375,22 @@ _cogl_winsys_egl_onscreen_deinit (CoglOnscreen *onscreen)
|
|||||||
wayland_onscreen->wayland_egl_native_window = NULL;
|
wayland_onscreen->wayland_egl_native_window = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* NB: The wayland protocol docs explicitly state that
|
||||||
|
* "wl_shell_surface_destroy() must be called before destroying the
|
||||||
|
* wl_surface object." ... */
|
||||||
|
if (wayland_onscreen->wayland_shell_surface)
|
||||||
|
{
|
||||||
|
wl_shell_surface_destroy (wayland_onscreen->wayland_shell_surface);
|
||||||
|
wayland_onscreen->wayland_shell_surface = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (wayland_onscreen->wayland_surface)
|
if (wayland_onscreen->wayland_surface)
|
||||||
{
|
{
|
||||||
wl_surface_destroy (wayland_onscreen->wayland_surface);
|
wl_surface_destroy (wayland_onscreen->wayland_surface);
|
||||||
wayland_onscreen->wayland_surface = NULL;
|
wayland_onscreen->wayland_surface = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
g_slice_free (CoglOnscreenWayland, wayland_onscreen);
|
g_slice_free (CoglOnscreenWayland, wayland_onscreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user