set/unset smart parent as e_widget when adding sub-objects

in the case where there is no smart parent, this fixes the object tree
and resolves some stacking issues. if there is a parent or a parent is added
later, nothing is changed

fixes eg. screenshot preview visibility in wayland
devs/illogict/signals_priority
Mike Blumenkrantz 7 years ago
parent 3e74bcb3d3
commit 5f9cbb1446
  1. 4
      src/bin/e_widget.c

@ -164,6 +164,8 @@ e_widget_sub_object_add(Evas_Object *obj, Evas_Object *sobj)
{
if (e_widget_can_focus_get(sobj)) sd->child_can_focus = 1;
}
if (!evas_object_smart_parent_get(sobj))
evas_object_smart_member_add(sobj, obj);
if (strcmp(evas_object_type_get(sobj), SMART_NAME)) return;
sd = evas_object_smart_data_get(sobj);
@ -179,6 +181,8 @@ E_API void
e_widget_sub_object_del(Evas_Object *obj, Evas_Object *sobj)
{
API_ENTRY return;
if (evas_object_smart_parent_get(sobj) == obj)
evas_object_smart_member_del(sobj);
evas_object_event_callback_del(sobj, EVAS_CALLBACK_DEL, _sub_obj_del);
sd->subobjs = eina_list_remove(sd->subobjs, sobj);
if (!sd->child_can_focus)

Loading…
Cancel
Save