static Eina_List *pol_vis_hooks = NULL;
static Ecore_Idle_Enterer *rot_idle_enterer = NULL;
static E_Client *fg_ec = NULL;
+static struct wl_global *rot_global;
/* local subsystem functions */
static Policy_Ext_Rotation* _policy_ext_rotation_get(E_Client *ec);
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl->wl.disp, EINA_FALSE);
- if (!wl_global_create(e_comp_wl->wl.disp, &tizen_policy_ext_interface, 3,
- NULL, _e_tizen_policy_ext_bind_cb))
+ rot_global = wl_global_create(e_comp_wl->wl.disp, &tizen_policy_ext_interface, 3,
+ NULL, _e_tizen_policy_ext_bind_cb);
+ if (!rot_global)
{
ERR("Could not add tizen_policy_ext to wayland globals: %m");
return EINA_FALSE;
E_FREE_LIST(rot_cbs, ecore_event_handler_del);
E_FREE_LIST(rot_obj_hooks, e_comp_object_intercept_hook_del);
+ if (rot_global)
+ {
+ wl_global_destroy(rot_global);
+ rot_global = NULL;
+ }
+
if (rot_idle_enterer)
{
ecore_idle_enterer_del(rot_idle_enterer);