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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2169>
This commit is contained in:
Robert Mader 2021-12-19 23:42:57 +01:00
parent 0df12ebee6
commit 6204769fdb

View File

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