summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@fishsoup.net>2013-12-03 00:27:03 -0500
committerOwen W. Taylor <otaylor@fishsoup.net>2013-12-09 15:29:33 -0500
commit01e0eaf1fce5015125a179ea3c27c200941e1b99 (patch)
tree71122a3bb6e9d5f0cf32c9dc6bf5694dab3b5dad
parentf679ce701762520594c2b21b5239ec60213b6f8c (diff)
MetaWindowGroup: fix paint volume
In the past, MetaWindowGroup was allocated the size of the screen and painted the size of the screen because it contained the screen background, but now we also have the "top window group" which contains only popup windows, so the allocation doesn't properly reflect the paint bounds of the window group. Compute the paint bounds accurately from the children. https://bugzilla.gnome.org/show_bug.cgi?id=719669
-rw-r--r--src/compositor/meta-window-group.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/compositor/meta-window-group.c b/src/compositor/meta-window-group.c
index 64494e58..168e5da4 100644
--- a/src/compositor/meta-window-group.c
+++ b/src/compositor/meta-window-group.c
@@ -277,11 +277,30 @@ meta_window_group_paint (ClutterActor *actor)
}
}
+/* Adapted from clutter_actor_update_default_paint_volume() */
static gboolean
-meta_window_group_get_paint_volume (ClutterActor *actor,
+meta_window_group_get_paint_volume (ClutterActor *self,
ClutterPaintVolume *volume)
{
- return clutter_paint_volume_set_from_allocation (volume, actor);
+ ClutterActorIter iter;
+ ClutterActor *child;
+
+ clutter_actor_iter_init (&iter, self);
+ while (clutter_actor_iter_next (&iter, &child))
+ {
+ const ClutterPaintVolume *child_volume;
+
+ if (!CLUTTER_ACTOR_IS_MAPPED (child))
+ continue;
+
+ child_volume = clutter_actor_get_transformed_paint_volume (child, self);
+ if (child_volume == NULL)
+ return FALSE;
+
+ clutter_paint_volume_union (volume, child_volume);
+ }
+
+ return TRUE;
}
static void