efl_ui_win: make win work for evas_norender

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);
Differential Revision: https://phab.enlightenment.org/D7425
This commit is contained in:
Shinwoo Kim 2018-12-18 10:40:33 +00:00 committed by Derek Foreman
parent b73a5ed704
commit b447a37ed8
1 changed files with 7 additions and 1 deletions

View File

@ -3564,7 +3564,7 @@ _elm_win_resize_objects_eval(Evas_Object *obj, Eina_Bool force_resize)
double wx, wy;
evas_object_size_hint_combined_min_get(sd->legacy.edje, &minw, &minh);
if ((!minw) && (!minh)) return;
if ((!minw) && (!minh) && (!sd->deferred_resize_job)) return;
// If content has a weight, make resizable
efl_gfx_size_hint_weight_get(sd->legacy.edje, &wx, &wy);
@ -3610,6 +3610,12 @@ _elm_win_resize_objects_eval(Evas_Object *obj, Eina_Bool force_resize)
sd->tmp_updating_hints = 0;
_elm_win_size_hints_update(obj, sd);
if (sd->deferred_resize_job)
_elm_win_resize_job(sd->obj);
/* do not need to go below. if you go, ee could become 0. */
if ((!minw) && (!minh)) return;
evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
w = ow;
h = oh;