summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/elementary/efl_ui_popup.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/lib/elementary/efl_ui_popup.c b/src/lib/elementary/efl_ui_popup.c
index 8d7271eb67..5d97a7d9c2 100644
--- a/src/lib/elementary/efl_ui_popup.c
+++ b/src/lib/elementary/efl_ui_popup.c
@@ -96,8 +96,18 @@ _parent_geom_cb(void *data, const Efl_Event *ev EINA_UNUSED)
96} 96}
97 97
98EOLIAN static void 98EOLIAN static void
99_efl_ui_popup_efl_ui_widget_widget_parent_set(Eo *obj, Efl_Ui_Popup_Data *pd EINA_UNUSED, Eo *parent EINA_UNUSED) 99_efl_ui_popup_efl_ui_widget_widget_parent_set(Eo *obj, Efl_Ui_Popup_Data *pd EINA_UNUSED, Eo *parent)
100{ 100{
101 if (!parent)
102 {
103 /* unsetting parent, probably before deletion */
104 if (pd->win_parent)
105 {
106 efl_event_callback_del(pd->win_parent, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _parent_geom_cb, obj);
107 efl_event_callback_del(pd->win_parent, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, _parent_geom_cb, obj);
108 }
109 goto end;
110 }
101 pd->win_parent = efl_provider_find(obj, EFL_UI_WIN_CLASS); 111 pd->win_parent = efl_provider_find(obj, EFL_UI_WIN_CLASS);
102 if (!pd->win_parent) 112 if (!pd->win_parent)
103 { 113 {
@@ -112,7 +122,7 @@ _efl_ui_popup_efl_ui_widget_widget_parent_set(Eo *obj, Efl_Ui_Popup_Data *pd EIN
112 122
113 efl_event_callback_add(pd->win_parent, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _parent_geom_cb, obj); 123 efl_event_callback_add(pd->win_parent, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _parent_geom_cb, obj);
114 efl_event_callback_add(pd->win_parent, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, _parent_geom_cb, obj); 124 efl_event_callback_add(pd->win_parent, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, _parent_geom_cb, obj);
115 125end:
116 efl_ui_widget_parent_set(efl_super(obj, MY_CLASS), parent); 126 efl_ui_widget_parent_set(efl_super(obj, MY_CLASS), parent);
117} 127}
118 128