ivi-shell: fix the layer assignment change from one screen to another
authorEmre Ucan <eucan@de.adit-jv.com>
Fri, 26 Jan 2018 14:04:59 +0000 (15:04 +0100)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Thu, 8 Feb 2018 12:17:12 +0000 (14:17 +0200)
if the layer is in order of some screen we need to remove it
from there and mark the screen order as dirty so it will be removed
in commit_screen_list call later
layer should only be assigned to one screen at a time

Signed-off-by: Eugen Friedrich <efriedrich@de.adit-jv.com>
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
ivi-shell/ivi-layout.c

index 5346d7e..d9a0c2d 100644 (file)
@@ -1538,6 +1538,11 @@ ivi_layout_screen_add_layer(struct weston_output *output,
 
        iviscrn = get_screen_from_output(output);
 
+       /*if layer is already assigned to screen make order of it dirty
+        * we are going to remove it (in commit_screen_list)*/
+       if (addlayer->on_screen)
+               addlayer->on_screen->order.dirty = 1;
+
        wl_list_remove(&addlayer->pending.link);
        wl_list_insert(&iviscrn->pending.layer_list, &addlayer->pending.link);