summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel van Vugt <daniel.van.vugt@canonical.com>2020-10-27 16:54:50 +0800
committerverdre <jonas@dressler.it>2020-10-27 19:33:30 +0000
commitc7a0ab3eb813dd78156434e492f1216766ec6c38 (patch)
treecc88bc47b6a29c82bdf125856c1bf71d7162fe8f
parenta77e1f200be444453d8562ef4ff9bb4cae79025f (diff)
downloadmutter-c7a0ab3eb813dd78156434e492f1216766ec6c38.tar.gz
background-content: ceilf the actor size instead of roundf
We want the bounding box so `ceilf` seems more appropriate. It was only written using `roundf` before as a workaround for inaccuracies coming out of `clutter_actor_get_transformed_size` that would have tricked `ceilf` into landing on the wrong integer. But that's since been fixed by 67cc60cbda so we can use `ceilf` now. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1532
-rw-r--r--src/compositor/meta-background-content.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compositor/meta-background-content.c b/src/compositor/meta-background-content.c
index 7990ad47b..b2da6b03f 100644
--- a/src/compositor/meta-background-content.c
+++ b/src/compositor/meta-background-content.c
@@ -532,8 +532,8 @@ meta_background_content_paint_content (ClutterContent *content,
clutter_actor_get_transformed_size (actor,
&transformed_width,
&transformed_height);
- rect_within_stage.width = roundf (transformed_width);
- rect_within_stage.height = roundf (transformed_height);
+ rect_within_stage.width = ceilf (transformed_width);
+ rect_within_stage.height = ceilf (transformed_height);
untransformed =
rect_within_actor.x == rect_within_stage.x &&