aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/edje
diff options
context:
space:
mode:
authorYeongjong Lee <yj34.lee@samsung.com>2018-08-29 21:11:00 +0900
committerHermet Park <hermetpark@gmail.com>2018-08-29 21:11:00 +0900
commite19292aa2b0a8098f3e6f5c63ba86e80f99df90b (patch)
tree0f39c9d713da0729869d4750ccd2478c5b724681 /src/lib/edje
parentElm.Mapbuf: do not set is_static_clip to its content (diff)
downloadefl-e19292aa2b0a8098f3e6f5c63ba86e80f99df90b.tar.gz
evas: call evas_find before safety check
Summary: edje_edit_object_add edje_object_add emotion_object_add evas_object_xxx_add These APIs had allowed to set parent to EFL_CANVAS_OBJECT(Evas_Object) before 8bb11a17. we should call evas_find before safety check for backward compatibility. Test Plan: win = elm_win_add(NULL, "main", ELM_WIN_BASIC); 1. `rect = evas_object_rectangle_add(evas_object_evas_get(win));` 2. `rect = evas_object_rectangle_add(win);` Check that 1. and 2. works. Reviewers: Hermet, zmike Reviewed By: Hermet Subscribers: cedric, #reviewers, CHAN, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6909
Diffstat (limited to 'src/lib/edje')
-rw-r--r--src/lib/edje/edje_edit.c3
-rw-r--r--src/lib/edje/edje_smart.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index e2bbc8498f..d3e919662a 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -291,8 +291,9 @@ _edje_edit_efl_file_mmap_set(Eo *obj, Edje_Edit *eed, const Eina_File *mmap, con
EAPI Evas_Object *
edje_edit_object_add(Evas *evas)
{
+ evas = evas_find(evas);
EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(evas, EVAS_CANVAS_CLASS), NULL);
- return efl_add(MY_CLASS, evas_find(evas), efl_canvas_object_legacy_ctor(efl_added));
+ return efl_add(MY_CLASS, evas, efl_canvas_object_legacy_ctor(efl_added));
}
EOLIAN static Eo *
diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c
index 9e405ceb56..5a715b35ed 100644
--- a/src/lib/edje/edje_smart.c
+++ b/src/lib/edje/edje_smart.c
@@ -22,8 +22,9 @@ Eina_Inlist *_edje_edjes = NULL;
EAPI Evas_Object *
edje_object_add(Evas *evas)
{
+ evas = evas_find(evas);
EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(evas, EVAS_CANVAS_CLASS), NULL);
- return efl_add(MY_CLASS, evas_find(evas), efl_canvas_object_legacy_ctor(efl_added));
+ return efl_add(MY_CLASS, evas, efl_canvas_object_legacy_ctor(efl_added));
}
EOLIAN static Eo *