[mutter/gnome-3-8] MetaWindowGroup: fix paint volume
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-3-8] MetaWindowGroup: fix paint volume
- Date: Mon, 9 Dec 2013 20:29:25 +0000 (UTC)
commit 16629c289f5d8e77ae042dc1ca1ee662e6bf1a06
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Tue Dec 3 00:27:03 2013 -0500
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
src/compositor/meta-window-group.c | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
---
diff --git a/src/compositor/meta-window-group.c b/src/compositor/meta-window-group.c
index fedae95..7972e65 100644
--- a/src/compositor/meta-window-group.c
+++ b/src/compositor/meta-window-group.c
@@ -250,11 +250,30 @@ meta_window_group_paint (ClutterActor *actor)
g_list_free (children);
}
+/* 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]