subsurface: Do not punch holes for subsurfaces that are above

If a subsurface is not below, it is visible no matter what the opaque
region is.

Also, we don't need to care about transparency in the subsurface if we
ignore it anyway. So this is a win-win.
This commit is contained in:
Benjamin Otte 2023-12-04 22:12:40 +01:00
parent 9bc0ad9a13
commit 8fd02f6fa2

View File

@ -647,6 +647,8 @@ gdk_wayland_surface_sync_opaque_region (GdkSurface *surface)
for (gsize i = 0; i < gdk_surface_get_n_subsurfaces (surface); i++)
{
GdkWaylandSubsurface *sub = (GdkWaylandSubsurface *)gdk_surface_get_subsurface (surface, i);
if (sub->above_parent)
continue;
if (sub->texture != NULL)
cairo_region_subtract_rectangle (region, &sub->dest);
}