[mutter] clutter/actor: Always query layout manager when getting size
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter/actor: Always query layout manager when getting size
- Date: Thu, 18 Jun 2020 19:56:09 +0000 (UTC)
commit ad50d2cfc4596d27645333f44bf57d68dbf696ae
Author: Jonas Dreßler <verdre v0yd nl>
Date: Thu Jun 18 17:07:33 2020 +0200
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
clutter/clutter/clutter-actor.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
index 7f6ef007b7..01a238274f 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]