Page MenuHomePhabricator

efl_ui_win: make win work for evas_norender

Authored by kimcinoo on Dec 6 2018, 2:59 AM.



The evas_norender updates the canvas internal objects.
But efl_ui_win does not evaluate its internal objects, when evas_norender is
called before showing, after resizing as below.

evas_object_resize(win, 300, 600);

This problem could be verified by checking if a resize function of internal
object is called or not.

minw,h is 0 in _elm_win_resize_objects_eval but deferred_resize_job is TRUE.

evas_norender -> _window_layout_stack ->  _elm_win_resize_objects_eval

So if _elm_win_resize_objects_eval does not return if deferred_resize_job is
TRUE even if minw,h is 0, and calls _elm_win_resize_job, then it will work.

_elm_win_resize_objects_eval -> _elm_win_resize_job ->
evas_object_geometry_set  -> _efl_canvas_group_group_need_recalculate_set ->
_window_layout_stack -> evas_object_geometry_set -> resize function.

I have checked this behavior without elementary. It seems that evas_norender
works between resize and show in this case. Let me share examples.

ecore_evas_resize(ee, 100, 100);
Test Plan

Use examples and set break point to resize function (ex: _sc_resize).
Check backtrace starts from evas_norender.

Example With Elementary

Example Without Elemetnary

Diff Detail

rEFL core/efl
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
kimcinoo created this revision.Dec 6 2018, 2:59 AM
kimcinoo requested review of this revision.Dec 6 2018, 2:59 AM
kimcinoo edited the test plan for this revision. (Show Details)Dec 6 2018, 3:08 AM
ManMower added inline comments.Dec 7 2018, 11:41 AM

What was this test (!minw && !minh) originally for? Existing code, like elementary_test, gets here with sd->deferred_resize_job TRUE and minw, minh == 0

It's not immediately obvious to me what impact the change has there, but it seems like this may be an unwanted side effect?

kimcinoo updated this revision to Diff 17965.Dec 18 2018, 2:40 AM

Handle potential side effect

ManMower accepted this revision.Jan 9 2019, 11:53 AM

This looks ok to me

This revision is now accepted and ready to land.Jan 9 2019, 11:53 AM
This revision was automatically updated to reflect the committed changes.