aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary/efl_ui_popup.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-08-20 08:12:35 -0400
committerCedric BAIL <cedric.bail@free.fr>2019-08-20 12:30:11 -0700
commit8c1354aef9466a5afb79ecfb3719d8fd2ea96790 (patch)
tree36c14fec2bff236e06be7321e4167772e92e21fa /src/lib/elementary/efl_ui_popup.c
parentefl_ui_widget: remove unused field (diff)
downloadefl-8c1354aef9466a5afb79ecfb3719d8fd2ea96790.tar.gz
efl_ui/popup: watch for hint change (safely) on popup object
ensure that setting user hints on this object triggers a recalc Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D9651
Diffstat (limited to '')
-rw-r--r--src/lib/elementary/efl_ui_popup.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/elementary/efl_ui_popup.c b/src/lib/elementary/efl_ui_popup.c
index 72773f41b6..643b578a3e 100644
--- a/src/lib/elementary/efl_ui_popup.c
+++ b/src/lib/elementary/efl_ui_popup.c
@@ -93,6 +93,15 @@ _parent_geom_cb(void *data, const Efl_Event *ev EINA_UNUSED)
efl_canvas_group_change(obj);
}
+static void
+_hints_changed_cb(void *data, const Efl_Event *ev EINA_UNUSED)
+{
+ Efl_Ui_Popup_Data *pd = data;
+
+ if (!pd->in_calc)
+ efl_canvas_group_change(ev->object);
+}
+
EOLIAN static void
_efl_ui_popup_efl_ui_widget_widget_parent_set(Eo *obj, Efl_Ui_Popup_Data *pd EINA_UNUSED, Eo *parent)
{
@@ -209,6 +218,7 @@ _efl_ui_popup_efl_object_constructor(Eo *obj, Efl_Ui_Popup_Data *pd)
elm_widget_theme_klass_set(obj, "popup");
obj = efl_constructor(efl_super(obj, MY_CLASS));
efl_canvas_object_type_set(obj, MY_CLASS_NAME);
+ efl_event_callback_add(obj, EFL_GFX_ENTITY_EVENT_HINTS_CHANGED, _hints_changed_cb, pd);
elm_widget_can_focus_set(obj, EINA_TRUE);
if (elm_widget_theme_object_set(obj, wd->resize_obj,