[PATCH weston 1/2] compositor: Mark all views as dirty when a new output is assigned

Armin Krezović krezovic.armin at gmail.com
Fri Aug 5 13:28:29 UTC 2016

When all outputs are gone and views were created before they
were gone, such views would have no output object assigned and
nothing would assign it later. This makes sure all views are
set as dirty, so they can get an output assigned when an
output gets plugged in, if they didn't have any output assigned.

Signed-off-by: Armin Krezović <krezovic.armin at gmail.com>
 libweston/compositor.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libweston/compositor.c b/libweston/compositor.c
index b045381..13c56c7 100644
--- a/libweston/compositor.c
+++ b/libweston/compositor.c
@@ -4325,8 +4325,13 @@ WL_EXPORT void
 weston_compositor_add_output(struct weston_compositor *compositor,
                              struct weston_output *output)
+	struct weston_view *view, *next;
 	wl_list_insert(compositor->output_list.prev, &output->link);
 	wl_signal_emit(&compositor->output_created_signal, output);
+	wl_list_for_each_safe(view, next, &compositor->view_list, link)
+		weston_view_geometry_dirty(view);

More information about the wayland-devel mailing list