[mutter] Compositor: sync stacking of window actors even if they're not parented to the window groups
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] Compositor: sync stacking of window actors even if they're not parented to the window groups
- Date: Tue, 12 Mar 2013 16:58:19 +0000 (UTC)
commit 889844b004a5fd8ce032ea2f7c38f6ed4e5c4363
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Tue Mar 12 17:01:51 2013 +0100
Compositor: sync stacking of window actors even if they're not parented to the window groups
Window actors might be temporarily parented to intermediate actors during
effect, but we should not require that the plugin keeps track of stacking.
Rather, assume that the intermediate groups holds a whole stack, and
applying position within it.
https://bugzilla.gnome.org/show_bug.cgi?id=695711
src/compositor/compositor.c | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c
index 20cbde4..fcc9a00 100644
--- a/src/compositor/compositor.c
+++ b/src/compositor/compositor.c
@@ -1095,13 +1095,17 @@ sync_actor_stacking (MetaCompScreen *info)
}
/* reorder the actors by lowering them in turn to the bottom of the stack.
- * windows first, then background */
+ * windows first, then background.
+ *
+ * We reorder the actors even if they're not parented to the window group,
+ * to allow stacking to work with intermediate actors (eg during effects)
+ */
for (tmp = g_list_last (info->windows); tmp != NULL; tmp = tmp->prev)
{
- ClutterActor *actor = tmp->data;
+ ClutterActor *actor = tmp->data, *parent;
- if (clutter_actor_get_parent (actor) == info->window_group)
- clutter_actor_set_child_below_sibling (info->window_group, actor, NULL);
+ parent = clutter_actor_get_parent (actor);
+ clutter_actor_set_child_below_sibling (parent, actor, NULL);
}
/* we prepended the backgrounds above so the last actor in the list
@@ -1109,10 +1113,10 @@ sync_actor_stacking (MetaCompScreen *info)
*/
for (tmp = backgrounds; tmp != NULL; tmp = tmp->next)
{
- ClutterActor *actor = tmp->data;
+ ClutterActor *actor = tmp->data, *parent;
- if (clutter_actor_get_parent (actor) == info->window_group)
- clutter_actor_set_child_below_sibling (info->window_group, actor, NULL);
+ parent = clutter_actor_get_parent (actor);
+ clutter_actor_set_child_below_sibling (parent, actor, NULL);
}
g_list_free (backgrounds);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]