[cogl] wayland: free framebuffer's shell surface on destroy
- From: Robert Bragg <rbragg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl] wayland: free framebuffer's shell surface on destroy
- Date: Fri, 26 Apr 2013 16:49:16 +0000 (UTC)
commit 760fc9f3af5475530262b82a55df311fceca358a
Author: Chris Cummins <christopher e cummins intel com>
Date: Fri Apr 26 15:04:36 2013 +0100
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>
cogl/winsys/cogl-winsys-egl-wayland.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/cogl/winsys/cogl-winsys-egl-wayland.c b/cogl/winsys/cogl-winsys-egl-wayland.c
index d7f7dc0..78115e8 100644
--- a/cogl/winsys/cogl-winsys-egl-wayland.c
+++ b/cogl/winsys/cogl-winsys-egl-wayland.c
@@ -374,12 +374,22 @@ _cogl_winsys_egl_onscreen_deinit (CoglOnscreen *onscreen)
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)
{
wl_surface_destroy (wayland_onscreen->wayland_surface);
wayland_onscreen->wayland_surface = NULL;
}
+
g_slice_free (CoglOnscreenWayland, wayland_onscreen);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]