ecore-wayland: plug some trivial leaks

This commit is contained in:
Mike Blumenkrantz 2015-10-20 17:51:22 -04:00
parent f4bd830e22
commit fe10889ec7
2 changed files with 7 additions and 1 deletions

View File

@ -554,6 +554,8 @@ _ecore_wl_shutdown(Eina_Bool close)
wl_compositor_destroy(_ecore_wl_disp->wl.compositor);
if (_ecore_wl_disp->wl.subcompositor)
wl_subcompositor_destroy(_ecore_wl_disp->wl.subcompositor);
if (_ecore_wl_disp->cursor_theme)
wl_cursor_theme_destroy(_ecore_wl_disp->cursor_theme);
if (_ecore_wl_disp->wl.display)
{
wl_registry_destroy(_ecore_wl_disp->wl.registry);
@ -727,7 +729,7 @@ _ecore_wl_cb_handle_global(void *data, struct wl_registry *registry, unsigned in
if (ewd->input)
_ecore_wl_input_setup(ewd->input);
else
else if (!ewd->cursor_theme)
{
ewd->cursor_theme =
wl_cursor_theme_load(NULL, ECORE_WL_DEFAULT_CURSOR_SIZE,

View File

@ -224,6 +224,8 @@ ecore_wl_input_cursor_size_set(Ecore_Wl_Input *input, const int size)
EINA_SAFETY_ON_NULL_RETURN(input->display->wl.shm);
if (input->display->cursor_theme)
wl_cursor_theme_destroy(input->display->cursor_theme);
input->display->cursor_theme =
wl_cursor_theme_load(NULL, input->cursor_size, input->display->wl.shm);
}
@ -239,6 +241,8 @@ ecore_wl_input_cursor_theme_name_set(Ecore_Wl_Input *input, const char *cursor_t
EINA_SAFETY_ON_NULL_RETURN(input->display->wl.shm);
if (input->display->cursor_theme)
wl_cursor_theme_destroy(input->display->cursor_theme);
input->display->cursor_theme =
wl_cursor_theme_load(input->cursor_theme_name, input->cursor_size,
input->display->wl.shm);