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>
This commit is contained in:
Jonas Ådahl 2020-11-13 08:49:13 +01:00 committed by Marge Bot
parent d2c798838e
commit a54970805d

View File

@ -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)
{