summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2014-10-15 02:47:56 -0400
committerChris Michael <cp.michael@samsung.com>2014-10-15 02:47:56 -0400
commita76224c464dc7ff084a5457afb2252036970a3b1 (patch)
tree1a0885e808ba650da7c888581e0e7ad612480559
parent4ae74022b538881c4b397a38231147eaedbc4671 (diff)
downloadenlightenment-a76224c464dc7ff084a5457afb2252036970a3b1.tar.gz
unset pixmap resource when surface resource is destroyed
Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/bin/e_comp_wl.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index f1f764e094..e03fa11406 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -6,6 +6,12 @@
#define E_COMP_WL_PIXMAP_CHECK \
if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return
+/* Resource Data Mapping: (wl_resource_user_data_get)
+ *
+ * wl_surface == e_pixmap
+ *
+ */
+
/* local functions */
static void
_e_comp_wl_log_cb_print(const char *format, va_list args)
@@ -67,6 +73,13 @@ _e_comp_wl_cb_module_idle(void *data)
static void
_e_comp_wl_surface_cb_destroy(struct wl_client *client EINA_UNUSED, struct wl_resource *resource)
{
+ E_Pixmap *ep;
+
+ /* unset the pixmap resource */
+ if ((ep = wl_resource_user_data_get(resource)))
+ e_pixmap_resource_set(ep, NULL);
+
+ /* destroy this resource */
wl_resource_destroy(resource);
}
@@ -153,15 +166,13 @@ _e_comp_wl_compositor_cb_surface_create(struct wl_client *client, struct wl_reso
return;
}
+ DBG("\tCreated Resource: %d", wl_resource_get_id(res));
+
/* FIXME: set callback ? */
/* set implementation on resource */
wl_resource_set_implementation(res, &_e_surface_interface, NULL, NULL);
// _callback);
- DBG("\tCreated Resource: %d", wl_resource_get_id(res));
-
- /* set implementation */
-
/* get the client pid and generate a pixmap id */
wl_client_get_credentials(client, &pid, NULL, NULL);
wid = e_comp_wl_id_get(pid, id);