From 9ff3b6124eed9bdea10ed504e2e147ba92438e25 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 24 Jul 2018 09:18:53 -0500 Subject: [PATCH] efl_ui_win: reset first_draw flag if window is resized while hidden Summary: this indicates that the window's internal object sizes will have changed, requiring a full window recalc. if the window is not visible, defer all recalcs until pre-render to avoid unnecessary calcs and use the same codepath as the initial window show ref T7172 Depends on D6646 Reviewers: kimcinoo, eagleeye, ManMower Reviewed By: ManMower Subscribers: cedric, #committers Tags: #efl_widgets Maniphest Tasks: T7172 Differential Revision: https://phab.enlightenment.org/D6647 --- src/lib/elementary/efl_ui_win.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index 4e1e1a8acc..3869c91754 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -3075,6 +3075,13 @@ _efl_ui_win_efl_gfx_entity_size_set(Eo *obj, Efl_Ui_Win_Data *sd, Eina_Size2D sz } efl_gfx_entity_size_set(efl_super(obj, MY_CLASS), sz); + /* if window is hidden during a resize, + * revert to initial state where pre-render triggers recalc and other resizes are deferred + */ + if (efl_gfx_entity_visible_get(obj)) return; + if (!sd->first_draw) return; + sd->first_draw = EINA_FALSE; + edje_object_freeze(sd->frame_obj); } static void