struct ds_tizen_screen_rotation_info *info;
E_Client *ec;
struct wl_listener ec_destroy;
+ struct wl_listener res_destroy;
} E_Comp_Screen_Tzsr;
static Eina_List *tzsr_list;
static struct wl_listener transform;
-static struct wl_listener gsr_destroy;
static struct ds_tizen_screen_rotation *g_screen_rotation = NULL;
static void _tz_screen_rotation_cb_ec_destroy(struct wl_listener *listener, void *data);
tzsr_list = eina_list_remove(tzsr_list, tzsr);
wl_list_remove(&tzsr->ec_destroy.link);
+ wl_list_remove(&tzsr->res_destroy.link);
free(tzsr);
}
}
static void
+_tz_screen_rotation_cb_res_destroy(struct wl_listener *listener, void *data)
+{
+ E_Comp_Screen_Tzsr *tzsr;
+ tzsr = wl_container_of(listener, tzsr, res_destroy);
+
+ _tz_screen_rotation_free(tzsr);
+}
+
+static void
_tz_screen_rotation_cb_get_ignore_output_transform(struct wl_listener *listener, void *data)
{
E_Comp_Screen_Tzsr *tzsr;
tzsr->info = info;
tzsr->ec_destroy.notify = _tz_screen_rotation_cb_ec_destroy;
e_client_destroy_listener_add(ec, &tzsr->ec_destroy);
+ tzsr->res_destroy.notify = _tz_screen_rotation_cb_res_destroy;
+ ds_tizen_screen_rotation_info_add_destroy_listener(info, &tzsr->res_destroy);
tzsr_list = eina_list_append(tzsr_list, tzsr);
e_comp_screen_rotation_ignore_output_transform_send(ec, ignore);
}
-static void
-_tz_screen_rotation_cb_destroy(struct wl_listener *listener, void *data)
-{
- E_Comp_Screen_Tzsr *tzsr;
- Eina_List *l, *ll;
-
- EINA_LIST_FOREACH_SAFE(tzsr_list, l, ll, tzsr)
- {
- _tz_screen_rotation_free(tzsr);
- }
-}
-
EINTERN Eina_Bool
e_screen_rotation_init()
{
transform.notify = _tz_screen_rotation_cb_get_ignore_output_transform;
ds_tizen_screen_rotation_add_get_ignore_output_transform_info_listener(g_screen_rotation, &transform);
- gsr_destroy.notify = _tz_screen_rotation_cb_destroy;
- ds_tizen_screen_rotation_add_destroy_listener(g_screen_rotation, &gsr_destroy);
-
return EINA_TRUE;
}