Bug 1137 - Setting the anchor point does not trigger a re-paint

* clutter/clutter-actor.c (clutter_actor_set_property): When
	changing the anchor point properties, use set_anchor_pointu
	instead of changing the value directly so that a redraw will be
	queued.
	(clutter_actor_set_anchor_pointu): Queue a redraw when the anchor
	point is changed. Thanks to Johan Bilien.
This commit is contained in:
Neil Roberts 2008-09-10 11:20:22 +00:00
parent 0515ee22c2
commit b83470366c
2 changed files with 29 additions and 2 deletions

View File

@ -1,3 +1,14 @@
2008-09-10 Neil Roberts <neil@o-hand.com>
Bug 1137 - Setting the anchor point does not trigger a re-paint
* clutter/clutter-actor.c (clutter_actor_set_property): When
changing the anchor point properties, use set_anchor_pointu
instead of changing the value directly so that a redraw will be
queued.
(clutter_actor_set_anchor_pointu): Queue a redraw when the anchor
point is changed. Thanks to Johan Bilien.
2008-08-27 Emmanuele Bassi <ebassi@openedhand.com>
Bug 1082 - Texture bitmap is destroyed in wrong way

View File

@ -1708,10 +1708,20 @@ clutter_actor_set_property (GObject *object,
}
break;
case PROP_ANCHOR_X:
priv->anchor_x = CLUTTER_UNITS_FROM_DEVICE (g_value_get_int (value));
{
int anchor_x = g_value_get_int (value);
clutter_actor_set_anchor_pointu (actor,
CLUTTER_UNITS_FROM_DEVICE (anchor_x),
priv->anchor_y);
}
break;
case PROP_ANCHOR_Y:
priv->anchor_y = CLUTTER_UNITS_FROM_DEVICE (g_value_get_int (value));
{
int anchor_y = g_value_get_int (value);
clutter_actor_set_anchor_pointu (actor,
priv->anchor_x,
CLUTTER_UNITS_FROM_DEVICE (anchor_y));
}
break;
case PROP_SHOW_ON_SET_PARENT:
priv->show_on_set_parent = g_value_get_boolean (value);
@ -6155,6 +6165,7 @@ clutter_actor_set_anchor_pointu (ClutterActor *self,
ClutterUnit anchor_y)
{
ClutterActorPrivate *priv;
gboolean changed = FALSE;
g_return_if_fail (CLUTTER_IS_ACTOR (self));
@ -6166,15 +6177,20 @@ clutter_actor_set_anchor_pointu (ClutterActor *self,
{
priv->anchor_x = anchor_x;
g_object_notify (G_OBJECT (self), "anchor-x");
changed = TRUE;
}
if (priv->anchor_y != anchor_y)
{
priv->anchor_y = anchor_y;
g_object_notify (G_OBJECT (self), "anchor-y");
changed = TRUE;
}
g_object_thaw_notify (G_OBJECT (self));
if (changed && CLUTTER_ACTOR_IS_VISIBLE (self))
clutter_actor_queue_redraw (self);
}
/**