From 0b536c02f97d7adfa8c4af4a4214f02d4ac9f716 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Fri, 22 Nov 2013 10:30:21 -0500 Subject: [PATCH] Bind constraints: Don't force redraws on source relayout When the source actor potentially changes size, that shouldn't necessarily result in the target actor being redrawn - it should be like when a child of a container is reallocated due to changes in its siblings or parent - it should redraw only to the extent that it is moved and resized. Privately export an internal function from clutter-actor.c to allow getting this right. https://bugzilla.gnome.org/show_bug.cgi?id=719367 --- clutter/clutter-actor-private.h | 1 + clutter/clutter-actor.c | 4 +--- clutter/clutter-bind-constraint.c | 2 +- clutter/clutter-snap-constraint.c | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/clutter/clutter-actor-private.h b/clutter/clutter-actor-private.h index 1c6f165..8bcf26c 100644 --- a/clutter/clutter-actor-private.h +++ b/clutter/clutter-actor-private.h @@ -318,6 +318,7 @@ void _clutter_actor_detach_clone ClutterActor *clone); void _clutter_actor_queue_redraw_on_clones (ClutterActor *actor); void _clutter_actor_queue_relayout_on_clones (ClutterActor *actor); +void _clutter_actor_queue_only_relayout (ClutterActor *actor); G_END_DECLS diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index 4ceb62c..4504ac6 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -1037,8 +1037,6 @@ static void clutter_anchor_coord_set_gravity (AnchorCoord *coord static gboolean clutter_anchor_coord_is_zero (const AnchorCoord *coord); -static void _clutter_actor_queue_only_relayout (ClutterActor *self); - static void _clutter_actor_get_relative_transformation_matrix (ClutterActor *self, ClutterActor *ancestor, CoglMatrix *matrix); @@ -8862,7 +8860,7 @@ _clutter_actor_queue_redraw_with_clip (ClutterActor *self, NULL /* effect */); } -static void +void _clutter_actor_queue_only_relayout (ClutterActor *self) { ClutterActorPrivate *priv = self->priv; diff --git a/clutter/clutter-bind-constraint.c b/clutter/clutter-bind-constraint.c index b9e45ab..fa94906 100644 --- a/clutter/clutter-bind-constraint.c +++ b/clutter/clutter-bind-constraint.c @@ -151,7 +151,7 @@ source_queue_relayout (ClutterActor *source, ClutterBindConstraint *bind) { if (bind->actor != NULL) - clutter_actor_queue_relayout (bind->actor); + _clutter_actor_queue_only_relayout (bind->actor); } static void diff --git a/clutter/clutter-snap-constraint.c b/clutter/clutter-snap-constraint.c index c8eaea9..b4c558f 100644 --- a/clutter/clutter-snap-constraint.c +++ b/clutter/clutter-snap-constraint.c @@ -94,7 +94,7 @@ source_queue_relayout (ClutterActor *source, ClutterSnapConstraint *constraint) { if (constraint->actor != NULL) - clutter_actor_queue_relayout (constraint->actor); + _clutter_actor_queue_only_relayout (constraint->actor); } static void -- 1.8.5.3