From fb7b3e2880a2c6bad93c20fa4241db8f7858f39d Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Thu, 4 Sep 2025 10:48:03 -0500 Subject: [PATCH] compositor: Make subsurface state application order consistent We have several places where we apply surface state, then walk the subsurface list. In surface_commit() however, we walk the list first then apply state. Re-order surface_commit() so it's the same as the other sites. Signed-off-by: Derek Foreman --- libweston/compositor.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libweston/compositor.c b/libweston/compositor.c index 69e2656c9..1d4510f75 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -5152,12 +5152,11 @@ surface_commit(struct wl_client *client, struct wl_resource *resource) if (sub) { status = weston_subsurface_commit(sub); } else { - status = WESTON_SURFACE_CLEAN; + status = weston_surface_commit(surface); wl_list_for_each(sub, &surface->subsurface_list, parent_link) { if (sub->surface != surface) status |= weston_subsurface_parent_apply(sub); } - status |= weston_surface_commit(surface); } if (status & WESTON_SURFACE_DIRTY_SUBSURFACE_CONFIG)