aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/elementary/efl_ui_popup.c6
-rw-r--r--src/lib/elementary/efl_ui_popup.eo8
-rw-r--r--src/lib/elementary/efl_ui_popup_anchor.c34
3 files changed, 30 insertions, 18 deletions
diff --git a/src/lib/elementary/efl_ui_popup.c b/src/lib/elementary/efl_ui_popup.c
index 344105436a..dc23b28b6a 100644
--- a/src/lib/elementary/efl_ui_popup.c
+++ b/src/lib/elementary/efl_ui_popup.c
@@ -112,12 +112,6 @@ _efl_ui_popup_efl_container_content_unset(Eo *obj, Efl_Ui_Popup_Data *pd EINA_UN
return efl_content_unset(efl_part(obj, "elm.swallow.content"));
}
-EOLIAN static Efl_Canvas_Object *
-_efl_ui_popup_parent_window_get(Eo *obj EINA_UNUSED, Efl_Ui_Popup_Data *pd)
-{
- return pd->win_parent;
-}
-
EOLIAN static void
_efl_ui_popup_align_set(Eo *obj EINA_UNUSED, Efl_Ui_Popup_Data *pd, Efl_Ui_Popup_Align type)
{
diff --git a/src/lib/elementary/efl_ui_popup.eo b/src/lib/elementary/efl_ui_popup.eo
index 06aefd019c..7af22ae33f 100644
--- a/src/lib/elementary/efl_ui_popup.eo
+++ b/src/lib/elementary/efl_ui_popup.eo
@@ -10,14 +10,6 @@ enum Efl.Ui.Popup.Align {
class Efl.Ui.Popup(Efl.Ui.Layout)
{
methods {
- @property parent_window @protected {
- get {
- [[Get the parent window of Popup.]]
- }
- values {
- window: Efl.Canvas.Object;
- }
- }
bg_set {
params {
@in file: string; [[The image file path.]]
diff --git a/src/lib/elementary/efl_ui_popup_anchor.c b/src/lib/elementary/efl_ui_popup_anchor.c
index 8ec41bc991..20ff3d80fa 100644
--- a/src/lib/elementary/efl_ui_popup_anchor.c
+++ b/src/lib/elementary/efl_ui_popup_anchor.c
@@ -24,7 +24,12 @@ _anchor_calc(Evas_Object *obj)
Evas_Coord_Size parent_size = {0, 0};
Eina_Position2D pos = {0, 0};
- Evas_Object *parent = efl_ui_popup_parent_window_get(obj);
+ Evas_Object *parent = efl_provider_find(obj, EFL_UI_WIN_CLASS);
+ if (!parent)
+ {
+ ERR("Cannot find window parent");
+ return;
+ }
evas_object_geometry_get(sd->anchor, &anchor_geom.x, &anchor_geom.y, &anchor_geom.w, &anchor_geom.h);
evas_object_geometry_get(obj, NULL, NULL, &popup_size.w, &popup_size.h);
@@ -209,7 +214,14 @@ _anchor_del_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
EFL_UI_POPUP_ANCHOR_DATA_GET(data, sd);
- efl_event_callback_del(efl_ui_popup_parent_window_get(data), EFL_GFX_EVENT_RESIZE, _anchor_geom_cb, data);
+ Evas_Object *parent = efl_provider_find(data, EFL_UI_WIN_CLASS);
+ if (!parent)
+ {
+ ERR("Cannot find window parent");
+ return;
+ }
+
+ efl_event_callback_del(parent, EFL_GFX_EVENT_RESIZE, _anchor_geom_cb, data);
sd->anchor = NULL;
efl_ui_popup_align_set(efl_super(data, MY_CLASS), sd->align);
@@ -222,7 +234,14 @@ _anchor_detach(Evas_Object *obj)
if (sd->anchor == NULL) return;
- efl_event_callback_del(efl_ui_popup_parent_window_get(obj), EFL_GFX_EVENT_RESIZE, _anchor_geom_cb, obj);
+ Evas_Object *parent = efl_provider_find(obj, EFL_UI_WIN_CLASS);
+ if (!parent)
+ {
+ ERR("Cannot find window parent");
+ return;
+ }
+
+ efl_event_callback_del(parent, EFL_GFX_EVENT_RESIZE, _anchor_geom_cb, obj);
efl_event_callback_del(sd->anchor, EFL_GFX_EVENT_RESIZE, _anchor_geom_cb, obj);
efl_event_callback_del(sd->anchor, EFL_GFX_EVENT_MOVE, _anchor_geom_cb, obj);
efl_event_callback_del(sd->anchor, EFL_EVENT_DEL, _anchor_del_cb, obj);
@@ -242,7 +261,14 @@ _efl_ui_popup_anchor_anchor_set(Eo *obj, Efl_Ui_Popup_Anchor_Data *pd, Evas_Obje
_anchor_calc(obj);
- efl_event_callback_add(efl_ui_popup_parent_window_get(obj), EFL_GFX_EVENT_RESIZE, _anchor_geom_cb, obj);
+ Evas_Object *parent = efl_provider_find(obj, EFL_UI_WIN_CLASS);
+ if (!parent)
+ {
+ ERR("Cannot find window parent");
+ return;
+ }
+
+ efl_event_callback_add(parent, EFL_GFX_EVENT_RESIZE, _anchor_geom_cb, obj);
efl_event_callback_add(anchor, EFL_GFX_EVENT_RESIZE, _anchor_geom_cb, obj);
efl_event_callback_add(anchor, EFL_GFX_EVENT_MOVE, _anchor_geom_cb, obj);
efl_event_callback_add(anchor, EFL_EVENT_DEL, _anchor_del_cb, obj);