Signed-off-by: Emre Ucan <[email protected]>
---
 ivi-shell/ivi-layout.c |   14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index d004e25..f9135eb 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -2189,10 +2189,6 @@ static int32_t
 ivi_layout_layer_add_surface(struct ivi_layout_layer *ivilayer,
                             struct ivi_layout_surface *addsurf)
 {
-       struct ivi_layout *layout = get_instance();
-       struct ivi_layout_surface *ivisurf = NULL;
-       struct ivi_layout_surface *next = NULL;
-
        if (ivilayer == NULL || addsurf == NULL) {
                weston_log("ivi_layout_layer_add_surface: invalid argument\n");
                return IVI_FAILED;
@@ -2201,14 +2197,8 @@ ivi_layout_layer_add_surface(struct ivi_layout_layer 
*ivilayer,
        if (addsurf->on_layer == ivilayer)
                return IVI_SUCCEEDED;
 
-       wl_list_for_each_safe(ivisurf, next, &layout->surface_list, link) {
-               if (ivisurf->id_surface == addsurf->id_surface) {
-                       wl_list_remove(&ivisurf->pending.link);
-                       wl_list_insert(&ivilayer->pending.surface_list,
-                                      &ivisurf->pending.link);
-                       break;
-               }
-       }
+       wl_list_remove(&addsurf->pending.link);
+       wl_list_insert(&ivilayer->pending.surface_list, &addsurf->pending.link);
 
        ivilayer->order.dirty = 1;
 
-- 
1.7.9.5

_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to