summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Ã…dahl <jadahl@gmail.com>2020-11-13 08:49:13 +0100
committerMarge Bot <marge-bot@gnome.org>2020-12-03 21:39:13 +0000
commita54970805d26a013755892f346c5ff4c114f08fa (patch)
treec52860ea9ef35fbca45061c14a8d640f8200461f
parentd2c798838e6710bf296f7bea78bd60efc7a24b5e (diff)
downloadmutter-a54970805d26a013755892f346c5ff4c114f08fa.tar.gz
wayland/subsurface: Don't include buffer-less subsurfaces in geometry
We'd get a wierd looking geometry if there were subsurfaces added without buffers as we'd pick up on their positions even though they were empty. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1557>
-rw-r--r--src/wayland/meta-wayland-subsurface.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wayland/meta-wayland-subsurface.c b/src/wayland/meta-wayland-subsurface.c
index bc481db06..00ccc7fef 100644
--- a/src/wayland/meta-wayland-subsurface.c
+++ b/src/wayland/meta-wayland-subsurface.c
@@ -222,7 +222,8 @@ meta_wayland_subsurface_union_geometry (MetaWaylandSubsurface *subsurface,
.height = meta_wayland_surface_get_height (surface),
};
- meta_rectangle_union (out_geometry, &geometry, out_geometry);
+ if (surface->buffer_ref->buffer)
+ meta_rectangle_union (out_geometry, &geometry, out_geometry);
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (surface, subsurface_surface)
{