forked from enlightenment/efl
Revert "evas - clip shutdown fix to avoid invalid mem accesses"
This reverts commit eb6af1f1ff
.
This commit was making the code much more complex than required. Let's make
eina_cow_free set the value back to its default.
This commit is contained in:
parent
07c306a272
commit
05e17cb6b6
|
@ -369,7 +369,6 @@ _clip_unset(Eo *eo_obj, void *_pd, va_list *list EINA_UNUSED)
|
||||||
{
|
{
|
||||||
Evas_Object_Protected_Data *obj = _pd;
|
Evas_Object_Protected_Data *obj = _pd;
|
||||||
|
|
||||||
if (!obj->cur) return;
|
|
||||||
if (!obj->cur->clipper) return;
|
if (!obj->cur->clipper) return;
|
||||||
|
|
||||||
obj->clip.cache_clipees_answer = eina_list_free(obj->clip.cache_clipees_answer);
|
obj->clip.cache_clipees_answer = eina_list_free(obj->clip.cache_clipees_answer);
|
||||||
|
@ -387,7 +386,7 @@ _clip_unset(Eo *eo_obj, void *_pd, va_list *list EINA_UNUSED)
|
||||||
{
|
{
|
||||||
EINA_COW_STATE_WRITE_BEGIN(obj->cur->clipper, state_write, cur)
|
EINA_COW_STATE_WRITE_BEGIN(obj->cur->clipper, state_write, cur)
|
||||||
{
|
{
|
||||||
if (state_write) state_write->have_clipees = 0;
|
state_write->have_clipees = 0;
|
||||||
}
|
}
|
||||||
EINA_COW_STATE_WRITE_END(obj->cur->clipper, state_write, cur);
|
EINA_COW_STATE_WRITE_END(obj->cur->clipper, state_write, cur);
|
||||||
|
|
||||||
|
@ -418,17 +417,14 @@ _clip_unset(Eo *eo_obj, void *_pd, va_list *list EINA_UNUSED)
|
||||||
if ((!obj->is_smart) &&
|
if ((!obj->is_smart) &&
|
||||||
(!((obj->map->cur.map) && (obj->map->cur.usemap))))
|
(!((obj->map->cur.map) && (obj->map->cur.usemap))))
|
||||||
{
|
{
|
||||||
if (obj->cur)
|
if (evas_object_is_in_output_rect(eo_obj, obj,
|
||||||
{
|
|
||||||
if (evas_object_is_in_output_rect(eo_obj, obj,
|
|
||||||
obj->layer->evas->pointer.x,
|
|
||||||
obj->layer->evas->pointer.y, 1, 1))
|
|
||||||
evas_event_feed_mouse_move(obj->layer->evas->evas,
|
|
||||||
obj->layer->evas->pointer.x,
|
obj->layer->evas->pointer.x,
|
||||||
obj->layer->evas->pointer.y,
|
obj->layer->evas->pointer.y, 1, 1))
|
||||||
obj->layer->evas->last_timestamp,
|
evas_event_feed_mouse_move(obj->layer->evas->evas,
|
||||||
NULL);
|
obj->layer->evas->pointer.x,
|
||||||
}
|
obj->layer->evas->pointer.y,
|
||||||
|
obj->layer->evas->last_timestamp,
|
||||||
|
NULL);
|
||||||
}
|
}
|
||||||
evas_object_clip_across_check(eo_obj, obj);
|
evas_object_clip_across_check(eo_obj, obj);
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,6 @@ void
|
||||||
evas_object_free(Evas_Object *eo_obj, int clean_layer)
|
evas_object_free(Evas_Object *eo_obj, int clean_layer)
|
||||||
{
|
{
|
||||||
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS);
|
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS);
|
||||||
Evas_Object *eo_obj2;
|
|
||||||
if (!obj) return;
|
if (!obj) return;
|
||||||
obj->clean_layer = clean_layer;
|
obj->clean_layer = clean_layer;
|
||||||
|
|
||||||
|
@ -172,21 +171,8 @@ evas_object_free(Evas_Object *eo_obj, int clean_layer)
|
||||||
obj->func->free(eo_obj, obj, obj->private_data);
|
obj->func->free(eo_obj, obj, obj->private_data);
|
||||||
}
|
}
|
||||||
if (!was_smart_child) evas_object_release(eo_obj, obj, obj->clean_layer);
|
if (!was_smart_child) evas_object_release(eo_obj, obj, obj->clean_layer);
|
||||||
EINA_LIST_FREE(obj->clip.clipees, eo_obj2)
|
if (obj->clip.clipees)
|
||||||
{
|
eina_list_free(obj->clip.clipees);
|
||||||
Evas_Object_Protected_Data *obj2 =
|
|
||||||
eo_data_scope_get(eo_obj2, MY_CLASS);
|
|
||||||
if ((obj2) && (obj2->cur))
|
|
||||||
{
|
|
||||||
EINA_COW_STATE_WRITE_BEGIN(obj2, state_write, cur)
|
|
||||||
{
|
|
||||||
state_write->clipper = NULL;
|
|
||||||
}
|
|
||||||
EINA_COW_STATE_WRITE_END(obj2, state_write, cur);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// if (obj->clip.clipees)
|
|
||||||
// obj->clip.clipees = eina_list_free(obj->clip.clipees);
|
|
||||||
obj->clip.cache_clipees_answer = eina_list_free(obj->clip.cache_clipees_answer);
|
obj->clip.cache_clipees_answer = eina_list_free(obj->clip.cache_clipees_answer);
|
||||||
evas_object_clip_changes_clean(eo_obj);
|
evas_object_clip_changes_clean(eo_obj);
|
||||||
evas_object_event_callback_all_del(eo_obj);
|
evas_object_event_callback_all_del(eo_obj);
|
||||||
|
@ -202,17 +188,12 @@ evas_object_free(Evas_Object *eo_obj, int clean_layer)
|
||||||
}
|
}
|
||||||
if (obj->size_hints)
|
if (obj->size_hints)
|
||||||
{
|
{
|
||||||
EVAS_MEMPOOL_FREE(_mp_sh, obj->size_hints);
|
EVAS_MEMPOOL_FREE(_mp_sh, obj->size_hints);
|
||||||
obj->size_hints = NULL;
|
|
||||||
}
|
}
|
||||||
eina_cow_free(evas_object_proxy_cow, obj->proxy);
|
eina_cow_free(evas_object_proxy_cow, obj->proxy);
|
||||||
eina_cow_free(evas_object_map_cow, obj->map);
|
eina_cow_free(evas_object_map_cow, obj->map);
|
||||||
eina_cow_free(evas_object_state_cow, obj->cur);
|
eina_cow_free(evas_object_state_cow, obj->cur);
|
||||||
eina_cow_free(evas_object_state_cow, obj->prev);
|
eina_cow_free(evas_object_state_cow, obj->prev);
|
||||||
obj->cur = NULL;
|
|
||||||
obj->prev = NULL;
|
|
||||||
obj->map = NULL;
|
|
||||||
obj->proxy = NULL;
|
|
||||||
eo_data_unref(eo_obj, obj->private_data);
|
eo_data_unref(eo_obj, obj->private_data);
|
||||||
obj->private_data = NULL;
|
obj->private_data = NULL;
|
||||||
eo_manual_free(eo_obj);
|
eo_manual_free(eo_obj);
|
||||||
|
|
Loading…
Reference in New Issue