[mutter] boxes: Fix calculation of rounded rectangles



commit 1b61b9cd733fb47f0d17b84321f4a5eb4db9db05
Author: Robert Mader <robert mader posteo de>
Date:   Wed May 29 00:05:03 2019 +0200

    boxes: Fix calculation of rounded rectangles
    
    Since 68fba458 the function is used for more calculations, exposing
    a bug when used with fractional scaling.
    
    https://gitlab.gnome.org/GNOME/mutter/issues/609

 src/core/boxes.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/core/boxes.c b/src/core/boxes.c
index 45efd8da2..25b709b5f 100644
--- a/src/core/boxes.c
+++ b/src/core/boxes.c
@@ -2132,8 +2132,8 @@ meta_rectangle_from_clutter_rect (ClutterRect          *rect,
         *dest = (MetaRectangle) {
           .x = ceilf (rect->origin.x),
           .y = ceilf (rect->origin.y),
-          .width = floorf (rect->origin.x + rect->size.width) - dest->x,
-          .height = floorf (rect->origin.y + rect->size.height) - dest->x,
+          .width = floorf (rect->size.width),
+          .height = floorf (rect->size.height),
         };
       }
       break;


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