[mutter] boxes: Actually check for rectangle containment



commit 318164779c07c12c5acfcddde7834980c7521aac
Author: Pablo Barciela <scow riseup net>
Date:   Sun Mar 3 16:05:55 2019 +0100

    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;
             }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]