diff options
author | Robert Mader <robert.mader@collabora.com> | 2022-01-26 22:04:52 +0100 |
---|---|---|
committer | Marius Vlad <marius.vlad@collabora.com> | 2022-05-24 19:43:58 +0300 |
commit | 7c30ab2dbdb6075e9368098123e966792ddafd69 (patch) | |
tree | 135980386ed8bca01742e4babc12860d3d95111b | |
parent | 2fa690a9a96431e76242fed834b287555e1cfcea (diff) | |
download | weston-7c30ab2dbdb6075e9368098123e966792ddafd69.tar.gz |
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 <robert.mader@collabora.com>
(cherry picked from commit 8b04534c76390cda00059e804b6f3f0bf92a56b8)
-rw-r--r-- | libweston/compositor.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, |