From 6204769fdb8a048ee23f49be0ca532f8ff1d557a Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Sun, 19 Dec 2021 23:42:57 +0100 Subject: [PATCH] surface-actor: Fix unobscurred_fraction calculation This calculation wrongly applied a `x2 - x1` pattern. Closes https://gitlab.gnome.org/GNOME/mutter/-/issues/1971 Part-of: --- src/compositor/meta-surface-actor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compositor/meta-surface-actor.c b/src/compositor/meta-surface-actor.c index 31442b404..c2bf6696a 100644 --- a/src/compositor/meta-surface-actor.c +++ b/src/compositor/meta-surface-actor.c @@ -499,7 +499,7 @@ meta_surface_actor_is_obscured_on_stage_view (MetaSurfaceActor *self, cairo_rectangle_int_t rect; cairo_region_get_rectangle (intersection_region, i, &rect); - intersection_size += (rect.width - rect.x) * (rect.height - rect.x); + intersection_size += rect.width * rect.height; } cairo_region_destroy (intersection_region);