summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--weston-ivi-shell/src/ivi-controller-impl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/weston-ivi-shell/src/ivi-controller-impl.c b/weston-ivi-shell/src/ivi-controller-impl.c
index 8b8ab81..235aacd 100644
--- a/weston-ivi-shell/src/ivi-controller-impl.c
+++ b/weston-ivi-shell/src/ivi-controller-impl.c
@@ -154,6 +154,7 @@ send_surface_add_event(struct ivisurface *ivisurf,
int i = 0;
struct ivilayer *ivilayer = NULL;
struct ivishell *shell = ivisurf->shell;
+ struct wl_client *client = wl_resource_get_client(resource);
ans = ivi_extension_get_layers_under_surface(shell, ivisurf->layout_surface,
&length, &pArray);
@@ -180,7 +181,10 @@ send_surface_add_event(struct ivisurface *ivisurf,
continue;
}
- wl_resource_for_each(layer_resource, &ivilayer->resource_list) {
+ layer_resource = wl_resource_find_for_client(&ivilayer->resource_list,
+ client);
+
+ if (layer_resource != NULL) {
ivi_controller_surface_send_layer(resource, layer_resource);
}
}