bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=721c097bb3e3f64f900b4fe73b8715b61a5cb908

commit 721c097bb3e3f64f900b4fe73b8715b61a5cb908
Author: Marcel Hollerbach <[email protected]>
Date:   Wed Jun 17 09:13:05 2020 +0200

    efl_ui_widget: addition to the previous commit
    
    in the previous commit we started to only receive the parent_obj from
    the evas object when its not a widget. However, we still need to ensure
    that the parent is equal to the current one in order to remove it when a
    widget.
    
    While this is one more call, the call to get the parent is not as
    heavy as the data_get call, as this directly addresses a struct, and
    does not read from a hash table.
    
    This also fixes a test case failure.
---
 src/lib/elementary/efl_ui_widget.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/elementary/efl_ui_widget.c 
b/src/lib/elementary/efl_ui_widget.c
index 0b6ea105a9..16e55ec6c9 100644
--- a/src/lib/elementary/efl_ui_widget.c
+++ b/src/lib/elementary/efl_ui_widget.c
@@ -1587,6 +1587,8 @@ _efl_ui_widget_widget_sub_object_del(Eo *obj, 
Elm_Widget_Smart_Data *sd, Evas_Ob
 
    if (is_widget)
      {
+       if (efl_ui_widget_parent_get(sobj) != obj)
+          return EINA_FALSE;
         if (_is_focused(sobj))
           {
              elm_widget_tree_unfocusable_set(sobj, EINA_TRUE);

-- 


Reply via email to