Skip to content

clutter/actor: Always use allocation size for picking

The usage of clutter_actor_get_preferred_width/height() for building the picking box can trigger Clutters size negotiation machinery in case the allocation of the actor is invalidated.

There's no need to do that though, when picking we always want to operate on the last known allocation of the actor, since that is what's actually painted on the screen.

So instead of not picking at all when an actors allocation is invalidated, just use the size of the last allocation. We still have to factor in one extra case, that's when an actor hasn't gotten any allocation yet: In that case we want to exclude the actor from picking since the actor is not on the screen yet.

Merge request reports

Loading