devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=979ba2f46731b3b21f7b9bd9a2b6768e9d1d1e27

commit 979ba2f46731b3b21f7b9bd9a2b6768e9d1d1e27
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Mon Nov 3 11:43:06 2014 -0500

    e-comp-wl: Implement subsurface place_above function
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/bin/e_comp_wl.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index c818e79..a8ee1b0 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 

-- 


Reply via email to