From a54970805d26a013755892f346c5ff4c114f08fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 13 Nov 2020 08:49:13 +0100 Subject: [PATCH] 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: --- src/wayland/meta-wayland-subsurface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) {