[PATCH weston] desktop-shell: Correctly migrate views to other outputs when output is disabled/disconnected
Marius Vlad
marius-cristian.vlad at nxp.com
Thu Feb 8 16:46:42 UTC 2018
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.vlad at 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
More information about the wayland-devel
mailing list