forked from enlightenment/enlightenment
e-comp-wl: Implement subsurface place_above function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
ee9e9a51ee
commit
979ba2f467
|
@ -1309,7 +1309,30 @@ _e_comp_wl_subsurface_cb_position_set(struct wl_client *client EINA_UNUSED, stru
|
|||
static void
|
||||
_e_comp_wl_subsurface_cb_place_above(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, struct wl_resource *sibling_resource)
|
||||
{
|
||||
E_Client *ec, *ecs;
|
||||
E_Client *parent;
|
||||
|
||||
DBG("Subsurface Cb Place Above: %d", wl_resource_get_id(resource));
|
||||
|
||||
/* try to get the client from resource data */
|
||||
if (!(ec = wl_resource_get_user_data(resource))) return;
|
||||
|
||||
if (!ec->comp_data->sub.data) return;
|
||||
|
||||
/* try to get the client from the sibling resource */
|
||||
if (!(ecs = wl_resource_get_user_data(sibling_resource))) return;
|
||||
|
||||
if (!ecs->comp_data->sub.data) return;
|
||||
|
||||
if (!(parent = ec->comp_data->sub.data->parent)) return;
|
||||
|
||||
parent->comp_data->sub.list =
|
||||
eina_list_remove(parent->comp_data->sub.list, ec);
|
||||
|
||||
parent->comp_data->sub.list =
|
||||
eina_list_append_relative(parent->comp_data->sub.list, ec, sibling);
|
||||
|
||||
parent->comp_data->sub.restack_target = parent;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue