static void _e_comp_wl_subsurface_remove_from_parent(E_Client *parent, E_Client *subc);
static void _e_comp_wl_subsurface_stack_update(E_Client *ec);
static Eina_Bool _e_comp_wl_subsurface_empty_check(E_Client *ec);
-static void _e_comp_wl_subsurface_parent_link(E_Comp_Wl_Subsurf_Data *sdata, E_Client *subc, E_Client *epc);
static void _e_comp_wl_subsurface_cb_evas_restack(void *data, Evas *e, Evas_Object *obj, void *event_info);
sdata->cached_buffer_ref.buffer = NULL;
sdata->resource = res;
sdata->synchronized = EINA_TRUE;
+ sdata->parent = epc;
sdata->remote_surface.offscreen_parent = offscreen_parent;
/* set subsurface client properties */
if (offscreen_parent)
ELOGF("COMP", " |offscreen_parent:%p", ec, offscreen_parent);
- _e_comp_wl_subsurface_parent_link(sdata, ec, epc);
+ if (epc->frame)
+ {
+ E_Layer layer = e_client_layer_get(epc);
+ if (layer > E_LAYER_BOTTOM) e_client_layer_set(ec, layer);
+
+ if ((!_e_comp_wl_subsurface_data_get(epc)) &&
+ (_e_comp_wl_subsurface_empty_check(epc)))
+ {
+ /* Add a callback function for restacking of topmost. */
+ evas_object_event_callback_add(epc->frame,
+ EVAS_CALLBACK_RESTACK,
+ _e_comp_wl_subsurface_cb_evas_restack,
+ epc);
+ }
+ }
+
+ if (epc->comp_data)
+ {
+ /* append this client to the parents subsurface list */
+ epc->comp_data->sub.list_pending =
+ eina_list_append(epc->comp_data->sub.list_pending, ec);
+ epc->comp_data->sub.list_changed = EINA_TRUE;
+ }
/* TODO: add callbacks ?? */
(eina_list_count(ec->comp_data->sub.below_list) == 0) &&
(eina_list_count(ec->comp_data->sub.below_list_pending) == 0));
}
-
-static void
-_e_comp_wl_subsurface_parent_link(E_Comp_Wl_Subsurf_Data *sdata, E_Client *subc, E_Client *epc)
-{
- E_Layer layer;
-
- sdata->parent = epc;
-
- if (epc->frame)
- {
- layer = e_client_layer_get(epc);
- if (layer > E_LAYER_BOTTOM)
- e_client_layer_set(subc, layer);
-
- if ((!_e_comp_wl_subsurface_data_get(epc)) &&
- (_e_comp_wl_subsurface_empty_check(epc)))
- {
- /* Add a callback function for restacking of topmost. */
- evas_object_event_callback_add(epc->frame,
- EVAS_CALLBACK_RESTACK,
- _e_comp_wl_subsurface_cb_evas_restack,
- epc);
- }
- }
-
- if (epc->comp_data)
- {
- /* append this client to the parents subsurface list */
- epc->comp_data->sub.list_pending =
- eina_list_append(epc->comp_data->sub.list_pending, subc);
- epc->comp_data->sub.list_changed = EINA_TRUE;
- }
-}