[mutter] wayland/subsurface: Don't include buffer-less subsurfaces in geometry



commit a54970805d26a013755892f346c5ff4c114f08fa
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Fri Nov 13 08:49:13 2020 +0100

    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>

 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 bc481db06d..00ccc7fefa 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)
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]