From a9a923c6f3acdaa868c0092778a895f0305bbb6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 9 Dec 2014 20:16:36 +0100 Subject: [PATCH] mir: correctly init/clear mutex and use prgname for surface --- cogl/winsys/cogl-winsys-egl-mir.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cogl/winsys/cogl-winsys-egl-mir.c b/cogl/winsys/cogl-winsys-egl-mir.c index bc6b6bcf7..1f19b0b2f 100644 --- a/cogl/winsys/cogl-winsys-egl-mir.c +++ b/cogl/winsys/cogl-winsys-egl-mir.c @@ -532,7 +532,7 @@ _cogl_winsys_egl_onscreen_init (CoglOnscreen *onscreen, } else { - surfaceparm.name = "CoglSurface"; + surfaceparm.name = g_get_prgname (); surfaceparm.width = cogl_framebuffer_get_width (framebuffer); surfaceparm.height = cogl_framebuffer_get_height (framebuffer); surfaceparm.pixel_format = _mir_connection_get_valid_format (mir_renderer->mir_connection); @@ -577,6 +577,7 @@ _cogl_winsys_egl_onscreen_init (CoglOnscreen *onscreen, event_handler.callback = _mir_surface_event_cb; event_handler.context = onscreen; mir_surface_set_event_handler (mir_onscreen->mir_surface, &event_handler); + g_mutex_init (&mir_onscreen->mir_event_lock); } return TRUE; @@ -592,6 +593,7 @@ _cogl_winsys_egl_onscreen_deinit (CoglOnscreen *onscreen) { mir_surface_set_event_handler (mir_onscreen->mir_surface, NULL); mir_surface_release_sync (mir_onscreen->mir_surface); + g_mutex_clear (&mir_onscreen->mir_event_lock); mir_onscreen->mir_surface = NULL; }