aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary/elm_widget.c
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel@osg.samsung.com>2017-11-21 16:12:12 +0100
committerMarcel Hollerbach <marcel@osg.samsung.com>2017-11-21 16:32:27 +0100
commit8c68c85706e37ede02917970371dabde05403e0b (patch)
treebdcbc8dcc96de1376004d760df8633cd20d4642d /src/lib/elementary/elm_widget.c
parentedje_cc: Not reset inherit_script during group inherit (diff)
downloadefl-8c68c85706e37ede02917970371dabde05403e0b.tar.gz
elm_widget: dont use the inner var for searching the top widget
you think there is only one elm_parent behind the elementary property parent? Oh no! Elm_Notify and Elm_Popup have theire own parent fields, and those fields are not returned when calleing elm_widget_parent_get, they are also not given to the elm_widget implementation of elm_widget_top_get, so a call to elm_widget_top_get stalls at elm.notify or elm.popup. fix https://phab.enlightenment.org/T6389
Diffstat (limited to 'src/lib/elementary/elm_widget.c')
-rw-r--r--src/lib/elementary/elm_widget.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c
index d735823d80..5186fea304 100644
--- a/src/lib/elementary/elm_widget.c
+++ b/src/lib/elementary/elm_widget.c
@@ -1927,10 +1927,11 @@ elm_widget_highlight_get(const Eo *obj)
EOLIAN static Evas_Object*
_elm_widget_widget_top_get(Eo *obj, Elm_Widget_Smart_Data *sd)
{
- if (sd->parent_obj)
+ Elm_Widget *parent = elm_widget_parent_get(obj);
+ if (parent)
{
- if (!efl_isa(sd->parent_obj, ELM_WIDGET_CLASS)) return NULL;
- return efl_ui_widget_top_get(sd->parent_obj);
+ if (!efl_isa(parent, ELM_WIDGET_CLASS)) return NULL;
+ return efl_ui_widget_top_get(parent);
}
return obj;
}