summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2016-02-29 12:11:56 -0600
committerDerek Foreman <derekf@osg.samsung.com>2016-03-07 19:45:37 -0600
commite42b950f68c51050fc13b4553b38f9da11013d73 (patch)
tree7a7e939788a57f3c97a3a7f8b32f99a1c9c81470
parent19c815c0bb47e02c8698e9fd4addc180fb0f57e3 (diff)
downloadenlightenment-e42b950f68c51050fc13b4553b38f9da11013d73.tar.gz
Take an extra reference on wayland clients
We need to make sure wayland clients aren't deleted while the scene graph has their data pointers, so we take an extra reference when creating them. We drop that reference by clearing the client's image data and putting it in the render post_updates list.
-rw-r--r--src/bin/e_comp_wl.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index d74f75bb08..c3ad5d8fc8 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -136,6 +136,22 @@ _e_comp_wl_evas_cb_hide(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EIN
EINA_LIST_FOREACH(ec->e.state.video_child, l, tmp)
evas_object_hide(tmp->frame);
+
+ if (e_object_is_del(E_OBJECT(ec)))
+ {
+ e_comp_object_dirty(ec->frame);
+ e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h);
+ if (e_comp_object_render(ec->frame))
+ {
+ if (!ec->on_post_updates)
+ {
+ ec->on_post_updates = EINA_TRUE;
+ e_comp->post_updates = eina_list_append(e_comp->post_updates,
+ ec);
+ }
+ else e_object_unref(E_OBJECT(ec));
+ }
+ }
}
static void
@@ -1532,6 +1548,8 @@ _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);
+
+ e_object_ref(E_OBJECT(ec));
}
static void