From 64feb2e5f0d383bdc2c619bbda42fe51b21fa937 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Mon, 22 May 2023 23:06:20 +0200 Subject: [PATCH] clutter/actor-box: Avoid rounding compensation for empty boxes Empty boxes should not be enlarged to non-empty boxes, otherwise we potentially confuse tests where we expect a zero-sized actor to also be on zero stage views. Part-of: --- clutter/clutter/clutter-actor-box.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clutter/clutter/clutter-actor-box.c b/clutter/clutter/clutter-actor-box.c index 2cbe691e6..e2fd87ce3 100644 --- a/clutter/clutter/clutter-actor-box.c +++ b/clutter/clutter/clutter-actor-box.c @@ -506,6 +506,9 @@ _clutter_actor_box_enlarge_for_effects (ClutterActorBox *box) { float width, height; + if (clutter_actor_box_get_area (box) == 0.0) + return; + /* The aim here is that for a given rectangle defined with floating point * coordinates we want to determine a stable quantized size in pixels * that doesn't vary due to the original box's sub-pixel position.