mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05:00
Revert "bind-constraint: Update the preferred size"
This reverts commit fcc67e99bc
.
It seems this causes some recursion overflow in GNOME Shell's usage of
constraints, and needs more investigation.
This commit is contained in:
parent
8df2efca6b
commit
f589b6f63a
@ -146,55 +146,6 @@ source_destroyed (ClutterActor *actor,
|
|||||||
bind->source = NULL;
|
bind->source = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
clutter_bind_constraint_update_preferred_size (ClutterConstraint *constraint,
|
|
||||||
ClutterActor *actor,
|
|
||||||
ClutterOrientation direction,
|
|
||||||
float for_size,
|
|
||||||
float *minimum_size,
|
|
||||||
float *natural_size)
|
|
||||||
{
|
|
||||||
ClutterBindConstraint *bind = CLUTTER_BIND_CONSTRAINT (constraint);
|
|
||||||
float source_min, source_nat;
|
|
||||||
|
|
||||||
if (bind->source == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* only these bindings affect the preferred size */
|
|
||||||
if (!(bind->coordinate == CLUTTER_BIND_WIDTH ||
|
|
||||||
bind->coordinate == CLUTTER_BIND_HEIGHT ||
|
|
||||||
bind->coordinate == CLUTTER_BIND_SIZE ||
|
|
||||||
bind->coordinate == CLUTTER_BIND_ALL))
|
|
||||||
return;
|
|
||||||
|
|
||||||
switch (direction)
|
|
||||||
{
|
|
||||||
case CLUTTER_ORIENTATION_HORIZONTAL:
|
|
||||||
if (bind->coordinate != CLUTTER_BIND_HEIGHT)
|
|
||||||
{
|
|
||||||
clutter_actor_get_preferred_width (bind->source, for_size,
|
|
||||||
&source_min,
|
|
||||||
&source_nat);
|
|
||||||
|
|
||||||
*minimum_size = source_min;
|
|
||||||
*natural_size = source_nat;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CLUTTER_ORIENTATION_VERTICAL:
|
|
||||||
if (bind->coordinate != CLUTTER_BIND_WIDTH)
|
|
||||||
{
|
|
||||||
clutter_actor_get_preferred_height (bind->source, for_size,
|
|
||||||
&source_min,
|
|
||||||
&source_nat);
|
|
||||||
|
|
||||||
*minimum_size = source_min;
|
|
||||||
*natural_size = source_nat;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_bind_constraint_update_allocation (ClutterConstraint *constraint,
|
clutter_bind_constraint_update_allocation (ClutterConstraint *constraint,
|
||||||
ClutterActor *actor,
|
ClutterActor *actor,
|
||||||
@ -377,8 +328,6 @@ clutter_bind_constraint_class_init (ClutterBindConstraintClass *klass)
|
|||||||
meta_class->set_actor = clutter_bind_constraint_set_actor;
|
meta_class->set_actor = clutter_bind_constraint_set_actor;
|
||||||
|
|
||||||
constraint_class->update_allocation = clutter_bind_constraint_update_allocation;
|
constraint_class->update_allocation = clutter_bind_constraint_update_allocation;
|
||||||
constraint_class->update_preferred_size = clutter_bind_constraint_update_preferred_size;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClutterBindConstraint:source:
|
* ClutterBindConstraint:source:
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user