mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
clutter/actor: Always query layout manager when getting size
There are cases where a layout manager used by an actor also wants to return a custom size when the actor has no children, for example in case the layout manager requests a fixed size. This is currently impossible because we only query the layout manager when calculating the preferred size if the actor has children. So fix that and also use the layout managers size negotiation functions in case the actor has no children. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1322
This commit is contained in:
parent
1398c6dfa4
commit
ad50d2cfc4
@ -2443,8 +2443,7 @@ clutter_actor_real_get_preferred_width (ClutterActor *self,
|
||||
{
|
||||
ClutterActorPrivate *priv = self->priv;
|
||||
|
||||
if (priv->n_children != 0 &&
|
||||
priv->layout_manager != NULL)
|
||||
if (priv->layout_manager != NULL)
|
||||
{
|
||||
ClutterContainer *container = CLUTTER_CONTAINER (self);
|
||||
|
||||
@ -2483,8 +2482,7 @@ clutter_actor_real_get_preferred_height (ClutterActor *self,
|
||||
{
|
||||
ClutterActorPrivate *priv = self->priv;
|
||||
|
||||
if (priv->n_children != 0 &&
|
||||
priv->layout_manager != NULL)
|
||||
if (priv->layout_manager != NULL)
|
||||
{
|
||||
ClutterContainer *container = CLUTTER_CONTAINER (self);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user