mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 12:32:05 +00:00
animator: only keys that are removed due to actors disappearing are inert
This commit is contained in:
parent
0f8ca38e59
commit
e4089efb4c
@ -354,12 +354,19 @@ sort_actor_prop_func (gconstpointer a,
|
|||||||
return pa->object - pb->object;
|
return pa->object - pb->object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
clutter_animator_remove_key_internal (ClutterAnimator *animator,
|
||||||
|
GObject *object,
|
||||||
|
const gchar *property_name,
|
||||||
|
gdouble progress,
|
||||||
|
gboolean is_inert);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
object_disappeared (gpointer data,
|
object_disappeared (gpointer data,
|
||||||
GObject *where_the_object_was)
|
GObject *where_the_object_was)
|
||||||
{
|
{
|
||||||
clutter_animator_remove_key (data, where_the_object_was, NULL, -1.0);
|
clutter_animator_remove_key_internal (data, where_the_object_was, NULL, -1.0,
|
||||||
|
TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ClutterAnimatorKey *
|
static ClutterAnimatorKey *
|
||||||
@ -1380,24 +1387,12 @@ clutter_animator_get_keys (ClutterAnimator *animator,
|
|||||||
return g_list_reverse (keys);
|
return g_list_reverse (keys);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
static void
|
||||||
* clutter_animator_remove_key:
|
clutter_animator_remove_key_internal (ClutterAnimator *animator,
|
||||||
* @animator: a #ClutterAnimator
|
|
||||||
* @object: (allow-none): a #GObject to search for, or %NULL for all
|
|
||||||
* @property_name: (allow-none): a specific property name to query for,
|
|
||||||
* or %NULL for all
|
|
||||||
* @progress: a specific progress to search for or a negative value
|
|
||||||
* for all
|
|
||||||
*
|
|
||||||
* Removes all keys matching the conditions specificed in the arguments.
|
|
||||||
*
|
|
||||||
* Since: 1.2
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
clutter_animator_remove_key (ClutterAnimator *animator,
|
|
||||||
GObject *object,
|
GObject *object,
|
||||||
const gchar *property_name,
|
const gchar *property_name,
|
||||||
gdouble progress)
|
gdouble progress,
|
||||||
|
gboolean is_inert)
|
||||||
{
|
{
|
||||||
ClutterAnimatorPrivate *priv;
|
ClutterAnimatorPrivate *priv;
|
||||||
GList *k;
|
GList *k;
|
||||||
@ -1419,7 +1414,7 @@ clutter_animator_remove_key (ClutterAnimator *animator,
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
ClutterAnimatorKey *prev_key = NULL;
|
ClutterAnimatorKey *prev_key = NULL;
|
||||||
key->is_inert = TRUE;
|
key->is_inert = is_inert;
|
||||||
|
|
||||||
clutter_animator_key_free (key);
|
clutter_animator_key_free (key);
|
||||||
|
|
||||||
@ -1465,6 +1460,29 @@ again:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_animator_remove_key:
|
||||||
|
* @animator: a #ClutterAnimator
|
||||||
|
* @object: (allow-none): a #GObject to search for, or %NULL for all
|
||||||
|
* @property_name: (allow-none): a specific property name to query for,
|
||||||
|
* or %NULL for all
|
||||||
|
* @progress: a specific progress to search for or a negative value
|
||||||
|
* for all
|
||||||
|
*
|
||||||
|
* Removes all keys matching the conditions specificed in the arguments.
|
||||||
|
*
|
||||||
|
* Since: 1.2
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
clutter_animator_remove_key (ClutterAnimator *animator,
|
||||||
|
GObject *object,
|
||||||
|
const gchar *property_name,
|
||||||
|
gdouble progress)
|
||||||
|
{
|
||||||
|
clutter_animator_remove_key_internal (animator, object, property_name,
|
||||||
|
progress, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user