This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository efl.

View the commit online.

commit f14376c4ea23a4b2b999b18bc07df5cb40dc5c96
Author: Cedric BAIL <[email protected]>
AuthorDate: Sat Oct 31 11:14:58 2026 -0600

    elementary: a layout calculates only the children that can be calculated
    
    A layout that calculates its sub-objects called
    efl_canvas_group_calculate on each of them, including plain canvas
    objects such as the event rectangle of Efl.Ui.Panel, and logged
    "could not be resolved on Efl.Canvas.Rectangle" for every one.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
 src/lib/elementary/efl_ui_layout.c        |  3 ++-
 src/tests/elementary/efl_ui_test_layout.c | 31 +++++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c
index afa9bf11b0..d1c2bb0d00 100644
--- a/src/lib/elementary/efl_ui_layout.c
+++ b/src/lib/elementary/efl_ui_layout.c
@@ -184,7 +184,8 @@ _sizing_eval(Evas_Object *obj, Efl_Ui_Layout_Data *sd, Elm_Layout_Data *ld)
         for (unsigned int i = 0; i < eina_array_count(wd->children); ++i)
           {
              subobj = eina_array_data_get(wd->children, i);
-             efl_canvas_group_calculate(subobj);
+             if (efl_isa(subobj, EFL_CANVAS_GROUP_CLASS))
+               efl_canvas_group_calculate(subobj);
           }
      }
    elm_coords_finger_size_adjust(sd->finger_size_multiplier_x, &rest_w,
diff --git a/src/tests/elementary/efl_ui_test_layout.c b/src/tests/elementary/efl_ui_test_layout.c
index d308453c5f..0338532bb9 100644
--- a/src/tests/elementary/efl_ui_test_layout.c
+++ b/src/tests/elementary/efl_ui_test_layout.c
@@ -452,8 +452,39 @@ EFL_START_TEST(efl_ui_layout_content_replaced_while_held)
 }
 EFL_END_TEST
 
+static void
+_count_errors(const Eina_Log_Domain *d, Eina_Log_Level level,
+              const char *file, const char *fnc, int line,
+              const char *fmt, void *data, va_list args)
+{
+   int *errors = data;
+
+   if (level <= EINA_LOG_LEVEL_ERR)
+     (*errors)++;
+   eina_log_print_cb_stderr(d, level, file, fnc, line, fmt, NULL, args);
+}
+
+/* A panel calculates its sub-objects when it is told to calculate, and one of
+   them is a plain rectangle that has no calculation to run. */
+EFL_START_TEST(efl_ui_layout_calc_subobjs_without_calc)
+{
+   Eo *win = win_add(NULL, "layout", EFL_UI_WIN_TYPE_BASIC);
+   Eo *panel;
+   int errors = 0;
+
+   panel = efl_add(EFL_UI_PANEL_CLASS, win);
+
+   eina_log_print_cb_set(_count_errors, &errors);
+   efl_canvas_group_calculate(panel);
+   eina_log_print_cb_set(eina_log_print_cb_stderr, NULL);
+
+   ck_assert_int_eq(errors, 0);
+}
+EFL_END_TEST
+
 void efl_ui_test_layout(TCase *tc)
 {
+   tcase_add_test(tc, efl_ui_layout_calc_subobjs_without_calc);
    tcase_add_test(tc, efl_ui_layout_content_replaced_while_held);
    tcase_add_test(tc, efl_ui_layout_part_without_widget);
    tcase_add_test(tc, efl_ui_layout_text_set_while_building);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to