aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/lib/elm_win.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2011-12-05 04:26:32 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2011-12-05 04:26:32 +0000
commitc74f2f3db540d7d7ea447d1d61ec9ce8225c2202 (patch)
treeeeae633838aa88a2692c128e13923440374fe3c5 /legacy/elementary/src/lib/elm_win.c
parentelementary/button - prevent the clicked event, when button is disabled or fre... (diff)
downloadefl-c74f2f3db540d7d7ea447d1d61ec9ce8225c2202.tar.gz
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)! SVN revision: 65884
Diffstat (limited to 'legacy/elementary/src/lib/elm_win.c')
-rw-r--r--legacy/elementary/src/lib/elm_win.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/legacy/elementary/src/lib/elm_win.c b/legacy/elementary/src/lib/elm_win.c
index 367089dd17..2df4827a6a 100644
--- a/legacy/elementary/src/lib/elm_win.c
+++ b/legacy/elementary/src/lib/elm_win.c
@@ -1367,6 +1367,21 @@ _win_inlined_image_set(Elm_Win *win)
_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 @@ elm_win_resize_object_add(Evas_Object *obj, Evas_Object *subobj)
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);
}