From: Changyeon Lee Date: Mon, 5 Aug 2024 04:46:13 +0000 (+0900) Subject: e_comp_object: restack the transform obj under the bottommost subsurface X-Git-Tag: accepted/tizen/unified/20240903.013845~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F89%2F316989%2F2;p=platform%2Fupstream%2Fenlightenment.git e_comp_object: restack the transform obj under the bottommost subsurface fix the problem of subsurface is not composited when subsurface is rendered by evas and the transform obj is enabled. Change-Id: If91ba1a05e127d9354fcc601619ef1ad52b4bc7c --- diff --git a/src/bin/compmgr/e_comp_object.c b/src/bin/compmgr/e_comp_object.c index d041d94..45d9cdc 100644 --- a/src/bin/compmgr/e_comp_object.c +++ b/src/bin/compmgr/e_comp_object.c @@ -354,35 +354,72 @@ _e_comp_object_cb_mirror_hide(void *data, Evas *e EINA_UNUSED, Evas_Object *obj } ///////////////////////////////////// +static Evas_Object * +_e_comp_object_bottommost_object_get(Evas_Object *obj) +{ + E_Client *sub; + API_ENTRY obj; + + if (!cw->ec) return obj; + if (!cw->ec->comp_data) return obj; + if (!cw->ec->comp_data->sub.below_list) return obj; + + sub = eina_list_data_get(cw->ec->comp_data->sub.below_list); + while (sub) + { + if (!sub->comp_data || !sub->comp_data->sub.below_list) + return sub->frame; + + sub = eina_list_data_get(sub->comp_data->sub.below_list); + } + + return obj; +} EINTERN void e_comp_object_transform_obj_stack_update(Evas_Object *obj) { int layer = 0; + Evas_Object *bottommost_obj; + E_Client *topmost_ec; + E_Comp_Object *topmost_cw; API_ENTRY; EINA_SAFETY_ON_NULL_RETURN(cw->ec); if (cw->ec->input_only) return; - layer = evas_object_layer_get(obj); + topmost_ec = e_comp_wl_topmost_parent_get(cw->ec); + if (!topmost_ec) return; - if (cw->transform_bg_obj) + topmost_cw = evas_object_smart_data_get(topmost_ec->frame); + if (!topmost_cw) return; + + if (e_util_strcmp(evas_object_type_get(topmost_ec->frame), SMART_NAME)) + return; + + if ((!topmost_cw->transform_bg_obj) && (!topmost_cw->transform_tranp_obj)) + return; + + bottommost_obj = _e_comp_object_bottommost_object_get(obj); + layer = evas_object_layer_get(bottommost_obj); + + if (topmost_cw->transform_bg_obj) { - if (layer != evas_object_layer_get(cw->transform_bg_obj)) + if (layer != evas_object_layer_get(topmost_cw->transform_bg_obj)) { - evas_object_layer_set(cw->transform_bg_obj, layer); + evas_object_layer_set(topmost_cw->transform_bg_obj, layer); } - evas_object_stack_below(cw->transform_bg_obj, obj); + evas_object_stack_below(topmost_cw->transform_bg_obj, bottommost_obj); } - if (cw->transform_tranp_obj) + if (topmost_cw->transform_tranp_obj) { - if (layer != evas_object_layer_get(cw->transform_tranp_obj)) + if (layer != evas_object_layer_get(topmost_cw->transform_tranp_obj)) { - evas_object_layer_set(cw->transform_tranp_obj, layer); + evas_object_layer_set(topmost_cw->transform_tranp_obj, layer); } - evas_object_stack_below(cw->transform_tranp_obj, obj); + evas_object_stack_below(topmost_cw->transform_tranp_obj, bottommost_obj); } } @@ -2495,7 +2532,6 @@ _e_comp_input_obj_smart_init(void) } } - static void _e_comp_smart_add(Evas_Object *obj) {