path: root/src/lib/elementary/efl_ui_win.c
diff options
authorShinwoo Kim <cinoo.kim@samsung.com>2018-12-18 10:40:33 +0000
committerDerek Foreman <derek.foreman.samsung@gmail.com>2019-01-10 13:05:17 -0600
commitb447a37ed877beeb40ecbb294f34a3fbfb432379 (patch)
tree3b4ea970acfe65667751612216310d61ffeb73b4 /src/lib/elementary/efl_ui_win.c
parentmeson: add a option to config the base directory name for elm data (diff)
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
Diffstat (limited to '')
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 64a78514df..aeafaf8db4 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -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;