From 42f56d0a0a77414db708dbb8b2d08ccc4aacab6f Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Mon, 9 Dec 2019 18:26:31 +0100 Subject: [PATCH] efl_ui_popup: do not leak the backwall part freeing it in the destructor is not enough. This has to be done at the invalidator stage, otherwise bindings might have a blocking element on the screen for the time the object is not gargabe collected. Reviewed-by: Jaehyun Cho Differential Revision: https://phab.enlightenment.org/D10837 --- src/lib/elementary/efl_ui_popup.c | 8 +++++++- src/lib/elementary/efl_ui_popup.eo | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_popup.c b/src/lib/elementary/efl_ui_popup.c index edf71073aa..da152b4062 100644 --- a/src/lib/elementary/efl_ui_popup.c +++ b/src/lib/elementary/efl_ui_popup.c @@ -568,9 +568,15 @@ _efl_ui_popup_efl_object_constructor(Eo *obj, Efl_Ui_Popup_Data *pd) } EOLIAN static void -_efl_ui_popup_efl_object_destructor(Eo *obj, Efl_Ui_Popup_Data *pd) +_efl_ui_popup_efl_object_invalidate(Eo *obj, Efl_Ui_Popup_Data *pd) { ELM_SAFE_DEL(pd->backwall); + efl_invalidate(efl_super(obj, MY_CLASS)); +} + +EOLIAN static void +_efl_ui_popup_efl_object_destructor(Eo *obj, Efl_Ui_Popup_Data *pd) +{ _anchor_detach(obj, pd); efl_event_callback_del(pd->win_parent, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _parent_geom_cb, diff --git a/src/lib/elementary/efl_ui_popup.eo b/src/lib/elementary/efl_ui_popup.eo index 322a7f8faf..66d8829f96 100644 --- a/src/lib/elementary/efl_ui_popup.eo +++ b/src/lib/elementary/efl_ui_popup.eo @@ -125,6 +125,7 @@ class Efl.Ui.Popup extends Efl.Ui.Layout_Base implements Efl.Content, Efl.Ui.Foc implements { Efl.Object.constructor; Efl.Object.destructor; + Efl.Object.invalidate; Efl.Canvas.Group.group_calculate; Efl.Gfx.Entity.position { set; } Efl.Gfx.Entity.size { set;}