summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>2014-07-29 14:30:58 +0900
committerNobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>2014-08-21 10:08:13 +0900
commitc7a38637a47a90230261b80066b160b738824441 (patch)
tree1879f5b45a848437f4aae8ec6cb122e422f91ee5
parent4a330d17e9c6b556172d49851967d00996654899 (diff)
downloadwayland-ivi-extension-c7a38637a47a90230261b80066b160b738824441.tar.gz
weston-ivi-shell: allow to create ivi_controller_surface with ID even if application doesn't map ID to wl_surface yet.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-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);