2011/12/5 Enlightenment SVN <[email protected]>:
> Log:
> fix super annoying elm_win bug that went something like this:
>
> win_resize_object_add(win, subobj);
> object_content_set(otherobj, subobj);
> object_del(win);
>
>
> ERR<21326>:elm-externals elm_widget.c:978 elm_widget_sub_object_del()
> removing sub object 0xdeadbeef (some_stupid_widget) from parent 0xRRRRRRRR
> (win), but elm-parent is different 0xFUCKTHIS (NOT EVEN A WIDGET)!
>
>
> Author: discomfitor
> Date: 2011-12-04 20:26:32 -0800 (Sun, 04 Dec 2011)
> New Revision: 65884
> Trac: http://trac.enlightenment.org/e/changeset/65884
>
> Modified:
> trunk/elementary/src/lib/elm_widget.c trunk/elementary/src/lib/elm_win.c
>
> Modified: trunk/elementary/src/lib/elm_widget.c
> ===================================================================
> --- trunk/elementary/src/lib/elm_widget.c 2011-12-05 04:03:12 UTC (rev
> 65883)
> +++ trunk/elementary/src/lib/elm_widget.c 2011-12-05 04:26:32 UTC (rev
> 65884)
> @@ -945,7 +945,7 @@
> _sub_obj_del);
> }
> }
> -
> + evas_object_smart_callback_call(sobj,
> "win-resize-del-private-dont-use-this. seriously", NULL);
Don't do this, the object added as resize object to the window is added
to the widgets sub-objects list, so when it's deleted or moved somewhere else
it should trigger the "sub-object-del" smart callback. The window should
be listening to add instead of creating random private things in other
components.
> sd->subobjs = eina_list_append(sd->subobjs, sobj);
> evas_object_data_set(sobj, "elm-parent", obj);
> evas_object_event_callback_add(sobj, EVAS_CALLBACK_DEL, _sub_obj_del, sd);
>
> Modified: trunk/elementary/src/lib/elm_win.c
> ===================================================================
> --- trunk/elementary/src/lib/elm_win.c 2011-12-05 04:03:12 UTC (rev 65883)
> +++ trunk/elementary/src/lib/elm_win.c 2011-12-05 04:26:32 UTC (rev 65884)
> @@ -1367,6 +1367,21 @@
> _win_img_focus_out, win);
> }
>
> +static void
> +_subobj_del(Evas_Object *obj, Evas_Object *subobj, void *event_info
> __UNUSED__)
> +{
> + Elm_Win *win = elm_widget_data_get(obj);
> + evas_object_event_callback_del_full(subobj,
> + EVAS_CALLBACK_CHANGED_SIZE_HINTS,
> +
> _elm_win_subobj_callback_changed_size_hints,
> + obj);
> + evas_object_event_callback_del_full(subobj, EVAS_CALLBACK_DEL,
> + _elm_win_subobj_callback_del, obj);
> + win->subobjs = eina_list_remove(win->subobjs, subobj);
> + evas_object_smart_callback_del(subobj,
> "win-resize-del-private-dont-use-this. seriously",
> (Evas_Smart_Cb)_subobj_del);
> + _elm_win_eval_subobjs(obj);
> +}
> +
> EAPI Evas_Object *
> elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
> {
> @@ -1678,6 +1693,7 @@
> evas_object_geometry_get(obj, NULL, NULL, &w, &h);
> evas_object_move(subobj, 0, 0);
> evas_object_resize(subobj, w, h);
> + evas_object_smart_callback_add(subobj,
> "win-resize-del-private-dont-use-this. seriously",
> (Evas_Smart_Cb)_subobj_del, obj);
> _elm_win_eval_subobjs(obj);
> }
>
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> _______________________________________________
> enlightenment-svn mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel