summaryrefslogtreecommitdiff
path: root/src/lib/elementary
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-02-15 13:32:15 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-02-15 13:38:19 +0900
commitc23ae314a447d7336d36469d03f1d560010cecc0 (patch)
treef9a5b51538837e45c8957d61b21080596496a636 /src/lib/elementary
parent2bc44b055e1ba0ddc2aa89e01770b9295c95d001 (diff)
elm_widget: Fix order of operations (isa before data_get)
This fixes some of the occurences of the following error message when using eo_debug: ERR<23101>:eo /home/jpeg/e/core/efl/src/lib/eo/eo.c:1955 efl_data_scope_get() Tried getting data of class 'Elm.Widget' from object of class 'Edje.Object', but the former is not a direct inheritance of the latter. If we're going to call efl_isa, then let's at least do it before efl_data_scope_get.
Diffstat (limited to 'src/lib/elementary')
-rw-r--r--src/lib/elementary/elm_widget.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c
index a391c9829e..dd459bbdb0 100644
--- a/src/lib/elementary/elm_widget.c
+++ b/src/lib/elementary/elm_widget.c
@@ -27,8 +27,10 @@
27 Elm_Widget_Smart_Data *wd = efl_data_scope_get(o, MY_CLASS) 27 Elm_Widget_Smart_Data *wd = efl_data_scope_get(o, MY_CLASS)
28 28
29#define API_ENTRY \ 29#define API_ENTRY \
30 ELM_WIDGET_DATA_GET(obj, sd); \ 30 Elm_Widget_Smart_Data *sd = NULL; \
31 if ((!sd) || (!_elm_widget_is(obj))) 31 if (!_elm_widget_is(obj) || \
32 (!(sd = efl_data_scope_get(obj, MY_CLASS))))
33
32#define INTERNAL_ENTRY \ 34#define INTERNAL_ENTRY \
33 ELM_WIDGET_DATA_GET(obj, sd); \ 35 ELM_WIDGET_DATA_GET(obj, sd); \
34 if (!sd) return 36 if (!sd) return
@@ -3141,15 +3143,16 @@ _elm_widget_disabled_eval(const Evas_Object *obj, Eina_Bool disabled)
3141 else 3143 else
3142 { 3144 {
3143 EINA_LIST_FOREACH(sd->subobjs, l, child) 3145 EINA_LIST_FOREACH(sd->subobjs, l, child)
3144 { 3146 if (elm_widget_is(child))
3145 ELM_WIDGET_DATA_GET(child, sdc); 3147 {
3146 if (elm_widget_is(child) && !sdc->disabled) 3148 ELM_WIDGET_DATA_GET(child, sdc);
3147 { 3149 if (!sdc->disabled)
3148 elm_widget_focus_disabled_handle(child); 3150 {
3149 elm_obj_widget_disable(child); 3151 elm_widget_focus_disabled_handle(child);
3150 _elm_widget_disabled_eval(child, EINA_FALSE); 3152 elm_obj_widget_disable(child);
3151 } 3153 _elm_widget_disabled_eval(child, EINA_FALSE);
3152 } 3154 }
3155 }
3153 } 3156 }
3154} 3157}
3155 3158