summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c5
-rwxr-xr-xweston-ivi-shell/src/ivi-controller.c17
2 files changed, 22 insertions, 0 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 037e170..e3f0e56 100644
--- a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c
+++ b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c
@@ -2505,6 +2505,11 @@ ilm_layerRemoveSurface(t_ilm_layer layerId,
returnValue = ILM_SUCCESS;
}
+ if ((ctx_surf != NULL) && (ctx_surf->notification != NULL)) {
+ ctx_surf->notification = NULL;
+ returnValue = ILM_SUCCESS;
+ }
+
release_instance();
return returnValue;
}
diff --git a/weston-ivi-shell/src/ivi-controller.c b/weston-ivi-shell/src/ivi-controller.c
index e9c37a1..434fc4b 100755
--- a/weston-ivi-shell/src/ivi-controller.c
+++ b/weston-ivi-shell/src/ivi-controller.c
@@ -81,6 +81,7 @@ struct ivicontroller_surface {
struct wl_client *client;
struct wl_list link;
struct ivishell *shell;
+ int implementation_set;
};
struct ivicontroller_layer {
@@ -1277,6 +1278,7 @@ controller_surface_create(struct wl_client *client,
struct ivicontroller_surface *ctrlsurf = NULL;
struct ivi_layout_SurfaceProperties prop;
struct ivisurface *ivisurf = NULL;
+ struct ivicontroller_surface *ctrl_link = NULL;
ctrlsurf = calloc(1, sizeof *ctrlsurf);
if (!ctrlsurf) {
@@ -1303,12 +1305,27 @@ controller_surface_create(struct wl_client *client,
return;
}
+ wl_list_for_each(ctrl_link, &shell->list_controller_surface, link) {
+ if ((ctrl_link->implementation_set == 0) &&
+ (ctrl_link->id_surface == id_surface) &&
+ (ctrl_link->shell == shell) &&
+ (ctrl_link->client != client)) {
+ ++ivisurf->controller_surface_count;
+ wl_resource_set_implementation(ctrl_link->resource,
+ &controller_surface_implementation,
+ ivisurf, destroy_ivicontroller_surface);
+ ctrl_link->implementation_set = 1;
+ }
+ }
+
++ivisurf->controller_surface_count;
wl_resource_set_implementation(ctrlsurf->resource,
&controller_surface_implementation,
ivisurf, destroy_ivicontroller_surface);
+ ctrlsurf->implementation_set = 1;
+
memset(&prop, 0, sizeof prop);
ivi_layout_getPropertiesOfSurface(ivisurf->layout_surface, &prop);