[metacity] boxes: Actually check for rectangle containment



commit ed965034dbd1164196f6ddd5be6d31538500b1b0
Author: Pablo Barciela <scow riseup net>
Date:   Wed Mar 6 02:58:52 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;
                }

 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 6d156d6d..1c2905e8 100644
--- a/src/core/boxes.c
+++ b/src/core/boxes.c
@@ -413,7 +413,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]