mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
Override Container inside ClutterStage
The only actor that results in a mix of the old Container API and the new Actor API is ClutterStage. By inheritance, a Stage is a Group, but we don't want it to behave like a Group - as it already overrides most of the Actor API, and the reason why it was made as a Group in the first place was convenience for adding/removing children. Given that touching Group to make it aware of the new Actor API has rapidly devolved into a struggle between a Demiurge that tries to avoid breakage and a Chaos that finds new and interesting ways to break ClutterGroup, let's declare API bankruptcy here and now. ClutterStage should override ClutterContainer methods, and use the layout management of ClutterFixedLayout as the proper class that it was meant to be ages ago. Let ClutterGroup rot in pieces.
This commit is contained in:

committed by
Emmanuele Bassi

parent
cfac97ffe1
commit
4330f45d05
@ -74,14 +74,6 @@ struct _ClutterGroupPrivate
|
||||
ClutterLayoutManager *layout;
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
ADD,
|
||||
REMOVE,
|
||||
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
static void clutter_container_iface_init (ClutterContainerIface *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (ClutterGroup, clutter_group, CLUTTER_TYPE_ACTOR,
|
||||
@ -283,13 +275,6 @@ clutter_group_real_sort_depth_order (ClutterContainer *container)
|
||||
|
||||
priv->children = g_list_sort (priv->children, sort_by_depth);
|
||||
|
||||
/* XXX - this is a hack, to ensure that the list of children that is stored
|
||||
* inside ClutterActor itself is kept in sync with the list of children held
|
||||
* by ClutterGroup. this is needed so we can use the old deprecated API and
|
||||
* mix it with the Actor API.
|
||||
*/
|
||||
_clutter_actor_sort_children (CLUTTER_ACTOR (container), sort_by_depth);
|
||||
|
||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (container));
|
||||
}
|
||||
|
||||
@ -312,14 +297,12 @@ clutter_group_real_paint (ClutterActor *actor)
|
||||
ClutterGroupPrivate *priv = CLUTTER_GROUP (actor)->priv;
|
||||
|
||||
CLUTTER_NOTE (PAINT, "ClutterGroup paint enter '%s'",
|
||||
clutter_actor_get_name (actor) ? clutter_actor_get_name (actor)
|
||||
: "unknown");
|
||||
_clutter_actor_get_debug_name (actor));
|
||||
|
||||
g_list_foreach (priv->children, (GFunc) clutter_actor_paint, NULL);
|
||||
|
||||
CLUTTER_NOTE (PAINT, "ClutterGroup paint leave '%s'",
|
||||
clutter_actor_get_name (actor) ? clutter_actor_get_name (actor)
|
||||
: "unknown");
|
||||
_clutter_actor_get_debug_name (actor));
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user