From 1b61b9cd733fb47f0d17b84321f4a5eb4db9db05 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Wed, 29 May 2019 00:05:03 +0200 Subject: [PATCH] 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;