clutter/actor: Set a minimum guessed scale

When running headlessly it fails guessing the scale to -1.0f making
the assertion g_assert (guessed_scale >= 0.5) fail.

Setting it to 1.f in that case fixes it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3464>
This commit is contained in:
Joan Torres 2023-12-18 18:33:16 +01:00 committed by Marge Bot
parent 4c6216e8a3
commit 3a94822e75

View File

@ -14666,6 +14666,9 @@ clutter_actor_get_real_resource_scale (ClutterActor *self)
max_scale = MAX (clutter_stage_view_get_scale (view), max_scale); max_scale = MAX (clutter_stage_view_get_scale (view), max_scale);
} }
if (max_scale < 0.f)
max_scale = 1.f;
guessed_scale = max_scale; guessed_scale = max_scale;
} }
else else