From 992ab893f9b21e58f4f596b82f3d5140439aae88 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Wed, 15 Oct 2025 13:21:17 -0500 Subject: [PATCH] compositor: Validate that paint node holes have planes If the backend says a hole is necessary, it must assign a plane for it. Signed-off-by: Derek Foreman --- libweston/compositor.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libweston/compositor.c b/libweston/compositor.c index 6554434b2..9bedbb1e7 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -275,6 +275,11 @@ paint_node_validate_ready(struct weston_paint_node *pnode) struct weston_compositor *comp = pnode->surface->compositor; struct weston_output *output = pnode->output; + /* A punch hole must have a plane assigned */ + if (pnode->need_hole) + weston_assert_true(comp, + pnode->plane != &output->primary_plane); + /* A censored pnode must not have a plane assigned, and must be * rendered solid, or we could leak protected content. */