mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05:00
clutter: Force an allocation on clone source if necessary
Since commit 0eab73dc
, actors are only allocated when they are actually
visible. While this generally works well, it breaks - because of *course*
it does - ClutterClones when the clone source (or any of its ancestors)
is hidden.
Force an allocation in that case to allow the clone's paint to work as
intended.
https://gitlab.gnome.org/GNOME/mutter/issues/683
This commit is contained in:
parent
59fb26cb00
commit
08a3cbfc6c
@ -252,6 +252,13 @@ clutter_clone_allocate (ClutterActor *self,
|
||||
if (priv->clone_source == NULL)
|
||||
return;
|
||||
|
||||
/* ClutterActor delays allocating until the actor is shown; however
|
||||
* we cannot paint it correctly in that case, so force an allocation.
|
||||
*/
|
||||
if (clutter_actor_get_parent (priv->clone_source) != NULL &&
|
||||
!clutter_actor_has_allocation (priv->clone_source))
|
||||
clutter_actor_allocate_preferred_size (priv->clone_source, flags);
|
||||
|
||||
#if 0
|
||||
/* XXX - this is wrong: ClutterClone cannot clone unparented
|
||||
* actors, as it will break all invariants
|
||||
|
Loading…
Reference in New Issue
Block a user