[mutter] window-group: Don't create a region when we have an unredirected window
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] window-group: Don't create a region when we have an unredirected window
- Date: Wed, 29 Aug 2012 18:40:11 +0000 (UTC)
commit dfe8979a90a06cb3cb165574acda1bec99eb6a55
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Aug 28 16:52:45 2012 -0300
window-group: Don't create a region when we have an unredirected window
We don't do anything with it other than modify an existing region.
https://bugzilla.gnome.org/show_bug.cgi?id=677116
src/compositor/meta-window-group.c | 20 +++++++-------------
1 files changed, 7 insertions(+), 13 deletions(-)
---
diff --git a/src/compositor/meta-window-group.c b/src/compositor/meta-window-group.c
index d654a24..885bcf1 100644
--- a/src/compositor/meta-window-group.c
+++ b/src/compositor/meta-window-group.c
@@ -182,9 +182,8 @@ static void
meta_window_group_paint (ClutterActor *actor)
{
cairo_region_t *visible_region;
- cairo_region_t *unredirected_window_region = NULL;
ClutterActor *stage;
- cairo_rectangle_int_t visible_rect, unredirected_rect;
+ cairo_rectangle_int_t visible_rect;
GList *children, *l;
int paint_x_origin, paint_y_origin;
int actor_x_origin, actor_y_origin;
@@ -216,12 +215,6 @@ meta_window_group_paint (ClutterActor *actor)
paint_x_offset = paint_x_origin - actor_x_origin;
paint_y_offset = paint_y_origin - actor_y_origin;
- if (info->unredirected_window != NULL)
- {
- meta_window_actor_get_shape_bounds (META_WINDOW_ACTOR (info->unredirected_window), &unredirected_rect);
- unredirected_window_region = cairo_region_create_rectangle (&unredirected_rect);
- }
-
/* We walk the list from top to bottom (opposite of painting order),
* and subtract the opaque area of each window out of the visible
* region that we pass to the windows below.
@@ -241,8 +234,12 @@ meta_window_group_paint (ClutterActor *actor)
visible_region = cairo_region_create_rectangle (&visible_rect);
- if (unredirected_window_region)
- cairo_region_subtract (visible_region, unredirected_window_region);
+ if (info->unredirected_window != NULL)
+ {
+ cairo_rectangle_int_t unredirected_rect;
+ meta_window_actor_get_shape_bounds (META_WINDOW_ACTOR (info->unredirected_window), &unredirected_rect);
+ cairo_region_subtract_rectangle (visible_region, &unredirected_rect);
+ }
for (l = children; l; l = l->next)
{
@@ -313,9 +310,6 @@ meta_window_group_paint (ClutterActor *actor)
cairo_region_destroy (visible_region);
- if (unredirected_window_region)
- cairo_region_destroy (unredirected_window_region);
-
CLUTTER_ACTOR_CLASS (meta_window_group_parent_class)->paint (actor);
/* Now that we are done painting, unset the visible regions (they will
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]