discomfitor pushed a commit to branch enlightenment-0.21.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=e561a31fec788ad5a3cf43ae8844bf4618d86a8b

commit e561a31fec788ad5a3cf43ae8844bf4618d86a8b
Author: Mike Blumenkrantz <[email protected]>
Date:   Tue Jul 19 13:05:28 2016 -0400

    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
---
 src/bin/e_widget.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/bin/e_widget.c b/src/bin/e_widget.c
index ac898dd..91cdd95 100644
--- a/src/bin/e_widget.c
+++ b/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)

-- 


Reply via email to