From 318164779c07c12c5acfcddde7834980c7521aac Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Sun, 3 Mar 2019 16:05:55 +0100 Subject: [PATCH] boxes: Actually check for rectangle containment Fixes condition duplicated: /* If a contains b, just remove b */ if (meta_rectangle_contains_rect (a, b)) { delete_me = other; } /* If b contains a, just remove a */ else if (meta_rectangle_contains_rect (a, b)) { delete_me = compare; } Closes https://gitlab.gnome.org/GNOME/mutter/issues/480 --- src/core/boxes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/boxes.c b/src/core/boxes.c index 4ab07d273..87f2d5d11 100644 --- a/src/core/boxes.c +++ b/src/core/boxes.c @@ -468,7 +468,7 @@ merge_spanning_rects_in_region (GList *region) delete_me = other; } /* If b contains a, just remove a */ - else if (meta_rectangle_contains_rect (a, b)) + else if (meta_rectangle_contains_rect (b, a)) { delete_me = compare; }