diff options
author | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2020-06-17 09:13:05 +0200 |
---|---|---|
committer | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2020-06-17 09:13:05 +0200 |
commit | 721c097bb3e3f64f900b4fe73b8715b61a5cb908 (patch) | |
tree | 22bc0438dfaf32247f533dd12593b048ce56111e /src/lib | |
parent | 18b0abf62f91fc4992ade39efb756a9f74bbe616 (diff) |
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.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/elementary/efl_ui_widget.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 | |||
1587 | 1587 | ||
1588 | if (is_widget) | 1588 | if (is_widget) |
1589 | { | 1589 | { |
1590 | if (efl_ui_widget_parent_get(sobj) != obj) | ||
1591 | return EINA_FALSE; | ||
1590 | if (_is_focused(sobj)) | 1592 | if (_is_focused(sobj)) |
1591 | { | 1593 | { |
1592 | elm_widget_tree_unfocusable_set(sobj, EINA_TRUE); | 1594 | elm_widget_tree_unfocusable_set(sobj, EINA_TRUE); |