From 7c30ab2dbdb6075e9368098123e966792ddafd69 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Wed, 26 Jan 2022 22:04:52 +0100 Subject: [PATCH] libweston/compositor: Do not map subsurfaces without buffer We can end in `subsurface_committed()` in different scenarios without the surface having an attached buffer. While setting the mapped state to `true` in that case doesn't matter for that (sub)surface itself, it triggers its own child subsurfaces to get mapped when they shouldn't. Closes https://gitlab.freedesktop.org/wayland/weston/-/issues/426 Signed-off-by: Robert Mader (cherry picked from commit 8b04534c76390cda00059e804b6f3f0bf92a56b8) --- libweston/compositor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libweston/compositor.c b/libweston/compositor.c index 452d32f7..3a838ec7 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -4364,7 +4364,7 @@ subsurface_committed(struct weston_surface *surface, int32_t dx, int32_t dy) */ if (!weston_surface_is_mapped(surface)) { - surface->is_mapped = true; + surface->is_mapped = surface->buffer_ref.buffer != NULL; /* Cannot call weston_view_update_transform(), * because that would call it also for the parent surface,