Our case is when the view is the same as output being disabled/disconnected.
There's not need to check the views' output with the output being disabled
because weston_view_assign_output() already changes the output of the view when
the output has been disabled/disconnected hence the check is not needed at all.

The views' output will always be different than the output being disabled.

By the time shell_output_destroy_move_layer() gets called the views' output has
already changed to a "free" output. Tested this by unplugging/disabling the
output on purpose.

Signed-off-by: Marius Vlad <marius-cristian.v...@nxp.com>
---
 desktop-shell/shell.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index de76ebe..d9dffd2 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -4698,12 +4698,8 @@ shell_output_destroy_move_layer(struct desktop_shell 
*shell,
        struct weston_output *output = data;
        struct weston_view *view;
 
-       wl_list_for_each(view, &layer->view_list.link, layer_link.link) {
-               if (view->output != output)
-                       continue;
-
+       wl_list_for_each(view, &layer->view_list.link, layer_link.link)
                shell_reposition_view_on_output_destroy(view);
-       }
 }
 
 static void
-- 
2.9.3

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

Reply via email to