desktop-shell: Correctly migrate views to other outputs when output is disabled/disconnected

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@nxp.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
dev
Marius Vlad 7 years ago committed by Daniel Stone
parent f461414501
commit ea40d6dbfc
  1. 6
      desktop-shell/shell.c

@ -4698,12 +4698,8 @@ shell_output_destroy_move_layer(struct desktop_shell *shell,
struct weston_output *output = data; struct weston_output *output = data;
struct weston_view *view; struct weston_view *view;
wl_list_for_each(view, &layer->view_list.link, layer_link.link) { wl_list_for_each(view, &layer->view_list.link, layer_link.link)
if (view->output != output)
continue;
shell_reposition_view_on_output_destroy(view); shell_reposition_view_on_output_destroy(view);
}
} }
static void static void

Loading…
Cancel
Save