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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2679>
This commit is contained in:
Robert Mader 2023-05-22 23:06:20 +02:00 committed by Marge Bot
parent a1749524da
commit 64feb2e5f0

View File

@ -506,6 +506,9 @@ _clutter_actor_box_enlarge_for_effects (ClutterActorBox *box)
{ {
float width, height; 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 /* The aim here is that for a given rectangle defined with floating point
* coordinates we want to determine a stable quantized size in pixels * coordinates we want to determine a stable quantized size in pixels
* that doesn't vary due to the original box's sub-pixel position. * that doesn't vary due to the original box's sub-pixel position.