From e96494801b0d7b0d279ce9030c8e05d5797ebf4b Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Wed, 14 Sep 2022 12:03:14 +0300 Subject: [PATCH] compositor: Clarify if view is in a layer As seen in some instances, subsurfaces do not have an entry in their layer_link, as we bring them into existence rather directly in the view_list and not using the layer list approach. This adds two messages to the debug scene graph to point out if the views aren't really in any layer or if they're indirectly in the view list using an ancestor (the main parent view actually). Signed-off-by: Marius Vlad --- libweston/compositor.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libweston/compositor.c b/libweston/compositor.c index cd53dbf56..d239c2902 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -7896,6 +7896,12 @@ debug_scene_view_print(FILE *fp, struct weston_view *view, int view_idx) fprintf(fp, "\t[view is not mapped!]\n"); if (!weston_surface_is_mapped(view->surface)) fprintf(fp, "\t[surface is not mapped!]\n"); + if (wl_list_empty(&view->layer_link.link)) { + if (!get_view_layer(view)) + fprintf(fp, "\t[view is not part of any layer]\n"); + else + fprintf(fp, "\t[view is under parent view layer]\n"); + } box = pixman_region32_extents(&view->transform.boundingbox); fprintf(fp, "\t\tposition: (%d, %d) -> (%d, %d)\n",