From: MinJeong Kim Date: Mon, 17 Oct 2016 11:29:11 +0000 (+0900) Subject: e_comp_wl: reparent subsurface if it is child of remote surface provider X-Git-Tag: submit/tizen/20161102.024749~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fff0edabd337b133d0d564a0818b3030c60668f5;p=platform%2Fupstream%2Fenlightenment.git e_comp_wl: reparent subsurface if it is child of remote surface provider Change-Id: I37a7cd02fb2c91e655d9f30c26c2e56fa49174cd Signed-off-by: MinJeong Kim --- diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 27e93fa535..88b5c84ba6 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -3701,6 +3701,7 @@ e_comp_wl_subsurface_create(E_Client *ec, E_Client *epc, uint32_t id, struct wl_ struct wl_client *client; struct wl_resource *res; E_Comp_Wl_Subsurf_Data *sdata; + E_Client *offscreen_parent = NULL; /* try to get the wayland client from the surface resource */ if (!(client = wl_resource_get_client(surface_resource))) @@ -3710,6 +3711,13 @@ e_comp_wl_subsurface_create(E_Client *ec, E_Client *epc, uint32_t id, struct wl_ return EINA_FALSE; } + // reparent remote surface provider's subsurfaces + if (epc->comp_data->remote_surface.onscreen_parent) + { + offscreen_parent = epc; + epc = epc->comp_data->remote_surface.onscreen_parent; + } + // check parent relationship is a cycle { E_Client *parent = epc; @@ -3758,6 +3766,7 @@ e_comp_wl_subsurface_create(E_Client *ec, E_Client *epc, uint32_t id, struct wl_ sdata->resource = res; sdata->synchronized = EINA_TRUE; sdata->parent = epc; + sdata->remote_surface.offscreen_parent = offscreen_parent; /* set subsurface client properties */ ec->borderless = EINA_TRUE; @@ -4108,6 +4117,7 @@ _e_comp_wl_client_cb_del(void *data EINA_UNUSED, E_Client *ec) evas_object_del(ec->comp_data->sub.below_obj); /* remove sub list */ + /* TODO: if parent is set by onscreen_parent of remote surface? */ EINA_LIST_FREE(ec->comp_data->sub.list, subc) if (subc->comp_data && subc->comp_data->sub.data) subc->comp_data->sub.data->parent = NULL; EINA_LIST_FREE(ec->comp_data->sub.list_pending, subc) diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h index 5302a17c35..89de838e22 100644 --- a/src/bin/e_comp_wl.h +++ b/src/bin/e_comp_wl.h @@ -146,6 +146,11 @@ struct _E_Comp_Wl_Subsurf_Data Eina_Bool synchronized; Eina_Bool stand_alone; + + struct + { + E_Client *offscreen_parent; + } remote_surface; }; struct _E_Comp_Wl_Input_Device