track and delete xdg-shell client hooks

fix T5242
This commit is contained in:
Mike Blumenkrantz 2017-03-10 15:57:15 -05:00
parent 1277ef9747
commit 7828db4575
4 changed files with 6 additions and 3 deletions

View File

@ -4,6 +4,7 @@
EINTERN Eina_Hash *shell_resources;
EINTERN Eina_Hash *xdg_shell_resources;
EINTERN Eina_List *hooks;
EINTERN void
e_shell_surface_destroy(struct wl_resource *resource)
@ -194,6 +195,6 @@ e_modapi_shutdown(E_Module *m EINA_UNUSED)
e_input_panel_shutdown();
eina_hash_free(shell_resources);
eina_hash_free(xdg_shell_resources);
E_FREE_LIST(hooks, e_client_hook_del);
return 1;
}

View File

@ -6,6 +6,8 @@ EINTERN void e_input_panel_shutdown(void);
EINTERN Eina_Hash *shell_resources;
EINTERN Eina_Hash *xdg_shell_resources;
EINTERN Eina_List *hooks;
EINTERN void e_shell_surface_destroy(struct wl_resource *resource);
EINTERN void e_shell_surface_cb_destroy(struct wl_resource *resource);

View File

@ -902,6 +902,6 @@ e_xdg_shell_v5_init(void)
ERR("Could not create xdg_shell global");
return EINA_FALSE;
}
e_client_hook_add(E_CLIENT_HOOK_DEL, _xdg5_client_hook_del, NULL);
hooks = eina_list_append(hooks, e_client_hook_add(E_CLIENT_HOOK_DEL, _xdg5_client_hook_del, NULL));
return EINA_TRUE;
}

View File

@ -1445,6 +1445,6 @@ e_xdg_shell_v6_init(void)
ERR("Could not create xdg_shell global");
return EINA_FALSE;
}
e_client_hook_add(E_CLIENT_HOOK_DEL, _xdg6_client_hook_del, NULL);
hooks = eina_list_append(hooks, e_client_hook_add(E_CLIENT_HOOK_DEL, _xdg6_client_hook_del, NULL));
return EINA_TRUE;
}