cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8c1354aef9466a5afb79ecfb3719d8fd2ea96790

commit 8c1354aef9466a5afb79ecfb3719d8fd2ea96790
Author: Mike Blumenkrantz <zm...@samsung.com>
Date:   Tue Aug 20 08:12:35 2019 -0400

    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.b...@free.fr>
    Differential Revision: https://phab.enlightenment.org/D9651
---
 src/lib/elementary/efl_ui_popup.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

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,

-- 


Reply via email to