diff options
author | Stefan Schmidt <stefan@osg.samsung.com> | 2015-08-25 15:48:56 +0200 |
---|---|---|
committer | Stefan Schmidt <stefan@osg.samsung.com> | 2015-10-22 17:20:25 +0200 |
commit | 129bbf1f90cabdf2ae525b7eb2bafd60a1aa463b (patch) | |
tree | 5feccadd652d142b525c82ba695b622bcafbd5fd | |
parent | 08f5f4b40e404690aecd97f1106d466214458e35 (diff) | |
download | enlightenment-129bbf1f90cabdf2ae525b7eb2bafd60a1aa463b.tar.gz |
WIP: start to play with assigning a new surface an uuid
-rw-r--r-- | src/bin/e_comp_wl.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 8e774dbd96..a82a837683 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -19,6 +19,8 @@ E_API int E_EVENT_WAYLAND_GLOBAL_ADD = -1; * */ +struct wl_resource *uuid_res; + static void _e_comp_wl_subsurface_parent_commit(E_Client *ec, Eina_Bool parent_synchronized); /* local variables */ @@ -1396,9 +1398,12 @@ _e_comp_wl_surface_destroy(struct wl_resource *resource) if (!(ec = wl_resource_get_user_data(resource))) return; _e_comp_wl_surface_render_stop(ec); + //e_uuid_store_entry_del(ec->uuid); e_object_del(E_OBJECT(ec)); } +#include <uuid.h> + static void _e_comp_wl_compositor_cb_surface_create(struct wl_client *client, struct wl_resource *resource, uint32_t id) { @@ -1406,6 +1411,7 @@ _e_comp_wl_compositor_cb_surface_create(struct wl_client *client, struct wl_reso E_Client *wc, *ec = NULL; Eina_List *l; pid_t pid; + char uuid[37]; DBG("Compositor Cb Surface Create: %d", id); @@ -1468,6 +1474,12 @@ _e_comp_wl_compositor_cb_surface_create(struct wl_client *client, struct wl_reso #endif /* emit surface create signal */ wl_signal_emit(&e_comp_wl->signals.surface.create, res); + + /* Send UUID for new pixmap back to app */ + uuid_unparse(ec->uuid, uuid); + printf("MOEP: Sending UUID to wayland client: %s\n", uuid); + //session_recovery_send_uuid(uuid_res, uuid); + session_recovery_send_uuid(uuid_res, "Comp to Client"); } static void @@ -2016,7 +2028,7 @@ _e_comp_wl_subcompositor_cb_bind(struct wl_client *client, void *data EINA_UNUSE static void _e_comp_wl_sr_cb_provide_uuid(struct wl_client *client EINA_UNUSED, struct wl_resource *resource EINA_UNUSED, const char *uuid) { - DBG("Provide UUID callback called for UUID: %s", uuid); + printf("Provide UUID callback called for UUID: %s\n", uuid); } static const struct session_recovery_interface _e_session_recovery_interface = @@ -2037,7 +2049,7 @@ _e_comp_wl_session_recovery_cb_bind(struct wl_client *client, void *data EINA_UN } /* set implementation on resource */ - wl_resource_set_implementation(res, &_e_session_recovery_interface, e_comp, NULL); + wl_resource_set_implementation(uuid_res, &_e_session_recovery_interface, e_comp, NULL); } static void |