diff options
author | Chris Michael <cp.michael@samsung.com> | 2014-11-03 11:43:06 -0500 |
---|---|---|
committer | Chris Michael <cp.michael@samsung.com> | 2014-11-03 12:27:13 -0500 |
commit | 979ba2f46731b3b21f7b9bd9a2b6768e9d1d1e27 (patch) | |
tree | 5b56bb1cd9d99952a1e56222ea8f3f4f2650b912 | |
parent | ee9e9a51ee392d7b8638bf457a207f60e6922561 (diff) | |
download | enlightenment-979ba2f46731b3b21f7b9bd9a2b6768e9d1d1e27.tar.gz |
e-comp-wl: Implement subsurface place_above function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r-- | src/bin/e_comp_wl.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index c818e7974f..a8ee1b0a74 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -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 |