|
|
3c14d2 |
From a796938b3991535ac9b5e79436ce1dbf1da72904 Mon Sep 17 00:00:00 2001
|
|
|
3c14d2 |
From: "Owen W. Taylor" <otaylor@fishsoup.net>
|
|
|
3c14d2 |
Date: Tue, 3 Dec 2013 00:27:03 -0500
|
|
|
3c14d2 |
Subject: [PATCH] MetaWindowGroup: fix paint volume
|
|
|
3c14d2 |
|
|
|
3c14d2 |
In the past, MetaWindowGroup was allocated the size of the screen and
|
|
|
3c14d2 |
painted the size of the screen because it contained the screen background,
|
|
|
3c14d2 |
but now we also have the "top window group" which contains only popup
|
|
|
3c14d2 |
windows, so the allocation doesn't properly reflect the paint bounds
|
|
|
3c14d2 |
of the window group. Compute the paint bounds accurately from the
|
|
|
3c14d2 |
children.
|
|
|
3c14d2 |
|
|
|
3c14d2 |
https://bugzilla.gnome.org/show_bug.cgi?id=719669
|
|
|
3c14d2 |
---
|
|
|
3c14d2 |
src/compositor/meta-window-group.c | 23 +++++++++++++++++++++--
|
|
|
3c14d2 |
1 file changed, 21 insertions(+), 2 deletions(-)
|
|
|
3c14d2 |
|
|
|
3c14d2 |
|
|
|
3c14d2 |
diff -up mutter-3.8.4/src/compositor/meta-window-group.c.window-group-paint-volume mutter-3.8.4/src/compositor/meta-window-group.c
|
|
|
3c14d2 |
--- mutter-3.8.4/src/compositor/meta-window-group.c.window-group-paint-volume 2014-02-11 11:36:22.448065800 -0500
|
|
|
3c14d2 |
+++ mutter-3.8.4/src/compositor/meta-window-group.c 2014-02-11 11:40:28.723506360 -0500
|
|
|
3c14d2 |
@@ -250,11 +250,30 @@ meta_window_group_paint (ClutterActor *a
|
|
|
3c14d2 |
g_list_free (children);
|
|
|
3c14d2 |
}
|
|
|
3c14d2 |
|
|
|
3c14d2 |
+/* Adapted from clutter_actor_update_default_paint_volume() */
|
|
|
3c14d2 |
static gboolean
|
|
|
3c14d2 |
-meta_window_group_get_paint_volume (ClutterActor *actor,
|
|
|
3c14d2 |
+meta_window_group_get_paint_volume (ClutterActor *self,
|
|
|
3c14d2 |
ClutterPaintVolume *volume)
|
|
|
3c14d2 |
{
|
|
|
3c14d2 |
- return clutter_paint_volume_set_from_allocation (volume, actor);
|
|
|
3c14d2 |
+ ClutterActorIter iter;
|
|
|
3c14d2 |
+ ClutterActor *child;
|
|
|
3c14d2 |
+
|
|
|
3c14d2 |
+ clutter_actor_iter_init (&iter, self);
|
|
|
3c14d2 |
+ while (clutter_actor_iter_next (&iter, &child))
|
|
|
3c14d2 |
+ {
|
|
|
3c14d2 |
+ const ClutterPaintVolume *child_volume;
|
|
|
3c14d2 |
+
|
|
|
3c14d2 |
+ if (!CLUTTER_ACTOR_IS_MAPPED (child))
|
|
|
3c14d2 |
+ continue;
|
|
|
3c14d2 |
+
|
|
|
3c14d2 |
+ child_volume = clutter_actor_get_transformed_paint_volume (child, self);
|
|
|
3c14d2 |
+ if (child_volume == NULL)
|
|
|
3c14d2 |
+ return FALSE;
|
|
|
3c14d2 |
+
|
|
|
3c14d2 |
+ clutter_paint_volume_union (volume, child_volume);
|
|
|
3c14d2 |
+ }
|
|
|
3c14d2 |
+
|
|
|
3c14d2 |
+ return TRUE;
|
|
|
3c14d2 |
}
|
|
|
3c14d2 |
|
|
|
3c14d2 |
static void
|