From: Hosang Kim Date: Mon, 16 Jan 2023 09:49:28 +0000 (+0900) Subject: efl_ui_win: support border style window. X-Git-Tag: accepted/tizen/unified/20230120.182028~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ba4325b92b231a4936c6da1a4f3796a64d2137f;p=platform%2Fupstream%2Fefl.git efl_ui_win: support border style window. 1. set minimum size of window to border size. 2. fix calcuating maximized window size. Change-Id: Ie1dfb33515555943c982cc81899d86bee69c575f --- diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index 21b5a57..f04afa88 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -1169,10 +1169,17 @@ _elm_win_size_hints_update(Efl_Ui_Win *win, Efl_Ui_Win_Data *sd) max = efl_gfx_hint_size_combined_max_get(win); if (max.w < 1) max.w = -1; if (max.h < 1) max.h = -1; - /*TIZEN_ONLY(20221111): Disable automatic size_min/max_set. + if (sd->frame_obj) + { + int fw, fh; + + evas_output_framespace_get(sd->evas, NULL, NULL, &fw, &fh); + min.w += fw; + min.h += fh; + } + TRAP(sd, size_min_set, min.w, min.h); TRAP(sd, size_max_set, max.w, max.h); - */ } static void @@ -1982,11 +1989,7 @@ _elm_win_frame_obj_update(Efl_Ui_Win_Data *sd, Eina_Bool force) if (!sd->first_draw) return; - evas_object_geometry_get(sd->obj, NULL, NULL, &w, &h); - if (w && h) - { - TRAP(sd, resize, w, h); - } + _elm_win_resize_objects_eval(sd->obj, force); } static int @@ -3909,7 +3912,7 @@ _efl_ui_win_efl_gfx_entity_size_set(Eo *obj, Efl_Ui_Win_Data *sd, Eina_Size2D sz sd->req_w = sz.w; sd->req_h = sz.h; //TIZEN_ONLY(20221228): add resize request set for ignoring configure event - if (sz.w > 1 && sz.h > 1) + if (sz.w > 1 && sz.h > 1 && !sd->frame_obj) { if ((sd->rot == 0) || (sd->rot == 180)) { @@ -4445,7 +4448,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) && (!sd->deferred_resize_job)) return; + if ((!minw) && (!minh) && (!sd->deferred_resize_job) && (!force_resize)) return; efl_gfx_hint_size_restricted_max_set(obj, EINA_SIZE2D(-1, -1)); // If content has a weight, make resizable @@ -4476,17 +4479,6 @@ _elm_win_resize_objects_eval(Evas_Object *obj, Eina_Bool force_resize) _elm_win_frame_style_update(sd, 0, 1); } - if (sd->frame_obj) - { - int fw, fh; - - evas_output_framespace_get(sd->evas, NULL, NULL, &fw, &fh); - minw += fw; - minh += fh; - maxw += fw; - maxh += fh; - } - sd->tmp_updating_hints = 1; efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(minw, minh)); efl_gfx_hint_size_restricted_max_set(obj, EINA_SIZE2D(maxw, maxh)); @@ -4494,7 +4486,7 @@ _elm_win_resize_objects_eval(Evas_Object *obj, Eina_Bool force_resize) _elm_win_size_hints_update(obj, sd); /* do not need to go below. if you go, ee could become 0. */ - if ((!minw) && (!minh)) return; + if ((!minw) && (!minh) && (!force_resize)) return; evas_object_geometry_get(obj, NULL, NULL, &ow, &oh); w = ow;