summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>2014-08-04 16:09:27 +0900
committerNobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>2014-08-21 10:08:14 +0900
commit6ee4b2e418bd6c0c9fd21ff7195faff3875da1e8 (patch)
tree4ec80b5e40968ced60187004c221e11adf6e11e4
parentd23c838e1548154be2909e14d5892f8df2720286 (diff)
downloadwayland-ivi-extension-6ee4b2e418bd6c0c9fd21ff7195faff3875da1e8.tar.gz
ilmControl: when called from AddNotification, notify of surface creation.1.2.0-rc7
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
-rw-r--r--ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c
index 6c68d74..41f2555 100644
--- a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c
+++ b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c
@@ -56,6 +56,7 @@ struct surface_context {
} order;
struct wayland_context *ctx;
+ bool is_surface_creation_noticed;
};
struct layer_context {
@@ -828,12 +829,19 @@ controller_listener_surface(void *data,
ctx_surf = get_surface_context(ctx, id_surface);
if (ctx_surf != NULL) {
- if (ctx_surf-> notification != NULL) {
- ctx_surf->notification(ctx_surf->id_surface,
- &ctx_surf->prop,
- ILM_NOTIFICATION_CONTENT_AVAILABLE);
+ if (!ctx_surf->is_surface_creation_noticed) {
+ if (ctx_surf->notification != NULL) {
+ ctx_surf->notification(ctx_surf->id_surface,
+ &ctx_surf->prop,
+ ILM_NOTIFICATION_CONTENT_AVAILABLE);
+ ctx_surf->is_surface_creation_noticed = true;
+ }
+ ctx_surf->controller = ivi_controller_surface_create(
+ controller, id_surface);
+ }
+ else {
+ fprintf(stderr, "invalid id_surface in controller_listener_surface\n");
}
- fprintf(stderr, "invalid id_surface in controller_listener_surface\n");
return;
}
@@ -853,6 +861,7 @@ controller_listener_surface(void *data,
ctx_surf->id_surface = id_surface;
ctx_surf->prop.inputDevicesAcceptance = ILM_INPUT_DEVICE_ALL;
ctx_surf->ctx = ctx;
+ ctx_surf->is_surface_creation_noticed = true;
wl_list_init(&ctx_surf->link);
wl_list_insert(&ctx->list_surface, &ctx_surf->link);
@@ -2425,10 +2434,11 @@ ilm_surfaceAddNotification(t_ilm_surface surface,
if (ctx_surf == NULL) {
if (callback != NULL) {
callback((uint32_t)surface, NULL, ILM_NOTIFICATION_CONTENT_REMOVED);
- }
- controller_listener_surface(ctx, ctx->wl.controller, (uint32_t)surface);
- ctx_surf = (struct surface_context*)get_surface_context(
+ controller_listener_surface(ctx, ctx->wl.controller, (uint32_t)surface);
+ ctx_surf = (struct surface_context*)get_surface_context(
&ctx->wl, (uint32_t)surface);
+ ctx_surf->is_surface_creation_noticed = false;
+ }
}
if (ctx_surf == NULL) {