[mutter/cherry-pick-6204769f] surface-actor: Fix unobscurred_fraction calculation
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/cherry-pick-6204769f] surface-actor: Fix unobscurred_fraction calculation
- Date: Mon, 20 Dec 2021 10:18:16 +0000 (UTC)
commit 4913578bbf15fa445d680bb78333d76396301181
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 31442b4042..c2bf6696a2 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]