summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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
parentb73a5ed704283d95edceb551341902df2b8a9b58 (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
-rw-r--r--src/lib/elementary/efl_ui_win.c8
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)
3564 double wx, wy; 3564 double wx, wy;
3565 3565
3566 evas_object_size_hint_combined_min_get(sd->legacy.edje, &minw, &minh); 3566 evas_object_size_hint_combined_min_get(sd->legacy.edje, &minw, &minh);
3567 if ((!minw) && (!minh)) return; 3567 if ((!minw) && (!minh) && (!sd->deferred_resize_job)) return;
3568 3568
3569 // If content has a weight, make resizable 3569 // If content has a weight, make resizable
3570 efl_gfx_size_hint_weight_get(sd->legacy.edje, &wx, &wy); 3570 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)
3610 sd->tmp_updating_hints = 0; 3610 sd->tmp_updating_hints = 0;
3611 _elm_win_size_hints_update(obj, sd); 3611 _elm_win_size_hints_update(obj, sd);
3612 3612
3613 if (sd->deferred_resize_job)
3614 _elm_win_resize_job(sd->obj);
3615
3616 /* do not need to go below. if you go, ee could become 0. */
3617 if ((!minw) && (!minh)) return;
3618
3613 evas_object_geometry_get(obj, NULL, NULL, &ow, &oh); 3619 evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
3614 w = ow; 3620 w = ow;
3615 h = oh; 3621 h = oh;