Skip to content

bind-constraint: Don't update preferred size if source contains actor

The ClutterBindConstraint will change the preferred size an actor reports so it returns the same size as the source actor in some cases. This behavior was introduced recently with 4f8e518d.

This can lead to infinite loops in case the source actor is a parent of the actor the BindConstraint is attached to, because calling get_preferred_size() on the source will recursively call get_preferred_size() on the actor again.

So to avoid those loops, check if the source is a parent of the actor we're attached to and don't update the preferred size in that case.

Edited by Jonas Dreßler

Merge request reports