Page MenuHomePhabricator

efl_ui_win: make win work for evas_norender
Needs ReviewPublic

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

Details

Summary

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);
evas_norender(evas_object_evas_get(win));
evas_object_show(win);

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);
evas_norender(evas);
ecore_evas_show(ee);
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

Repository
rEFL core/efl
Branch
efl_ui_win.make_win_work_for_norender
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 8366
Build 7576: arc lint + arc unit
kimcinoo created this revision.Thu, Dec 6, 2:59 AM
kimcinoo requested review of this revision.Thu, Dec 6, 2:59 AM
kimcinoo edited the test plan for this revision. (Show Details)Thu, Dec 6, 3:08 AM
ManMower added inline comments.Fri, Dec 7, 11:41 AM
src/lib/elementary/efl_ui_win.c
3566

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?