[mutter/gnome-40] surface-actor: Fix unobscurred_fraction calculation
- From: Robert Mader <rmader src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-40] surface-actor: Fix unobscurred_fraction calculation
- Date: Mon, 20 Dec 2021 11:14:39 +0000 (UTC)
commit 577aea5b4f17e77282f6cbe30aacf9fa9518e767
Author: Robert Mader <robert mader posteo de>
Date: Sun Dec 19 23:42:57 2021 +0100
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>
(cherry picked from commit 6204769fdb8a048ee23f49be0ca532f8ff1d557a)
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 48042b227d..d630717b52 100644
--- a/src/compositor/meta-surface-actor.c
+++ b/src/compositor/meta-surface-actor.c
@@ -524,7 +524,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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]