bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8c68c85706e37ede02917970371dabde05403e0b

commit 8c68c85706e37ede02917970371dabde05403e0b
Author: Marcel Hollerbach <[email protected]>
Date:   Tue Nov 21 16:12:12 2017 +0100

    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 T6389
---
 src/lib/elementary/elm_widget.c | 7 ++++---
 1 file 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;
 }

-- 


Reply via email to