Re: [PATCH weston 4/4] ivi-shell: fix the layer assignment change from one screen to another

2018-02-07 Thread Pekka Paalanen
On Fri, 26 Jan 2018 15:04:59 +0100
Emre Ucan  wrote:

> 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 
> Signed-off-by: Emre Ucan 
> ---
>  ivi-shell/ivi-layout.c | 5 +
>  1 file changed, 5 insertions(+)
> 
> diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
> index 4799c25..976a426 100644
> --- a/ivi-shell/ivi-layout.c
> +++ b/ivi-shell/ivi-layout.c
> @@ -1535,6 +1535,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);
>  

Hi,

makes sense to me, though I didn't carefully trace through the code.

Reviewed-by: Pekka Paalanen 


Thanks,
pq


pgp9_ElwIMRID.pgp
Description: OpenPGP digital signature
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


[PATCH weston 4/4] ivi-shell: fix the layer assignment change from one screen to another

2018-01-26 Thread Emre Ucan
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 
Signed-off-by: Emre Ucan 
---
 ivi-shell/ivi-layout.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index 4799c25..976a426 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -1535,6 +1535,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);
 
-- 
2.7.4

___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel