~ubuntu-branches/ubuntu/wily/mutter/wily

« back to all changes in this revision

Viewing changes to src/compositor/mutter-window-group.c

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-10-01 11:39:17 UTC
  • mfrom: (1.2.1 upstream) (10.1.20 maverick)
  • Revision ID: james.westby@ubuntu.com-20101001113917-d1c9zswwaehyn07e
Tags: 2.31.5-0ubuntu9
* debian/patches/20_unity_no_3D_detection.patch:
  - add an extra string in fallback mode to guide user in live session
    (LP: #651085)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
2
2
 
 
3
#include <config.h>
 
4
 
3
5
#define _ISOC99_SOURCE /* for roundf */
4
6
#include <math.h>
5
7
 
6
8
#include "mutter-window-private.h"
7
9
#include "mutter-window-group.h"
 
10
#include "region.h"
8
11
 
9
12
struct _MutterWindowGroupClass
10
13
{
99
102
mutter_window_group_paint (ClutterActor *actor)
100
103
{
101
104
  MutterWindowGroup *window_group = MUTTER_WINDOW_GROUP (actor);
102
 
  GdkRegion *visible_region;
 
105
  MetaRegion *visible_region;
103
106
  GdkRectangle screen_rect = { 0 };
104
107
  GList *children, *l;
105
108
 
116
119
   * optimization, however.)
117
120
   */
118
121
  meta_screen_get_size (window_group->screen, &screen_rect.width, &screen_rect.height);
119
 
  visible_region = gdk_region_rectangle (&screen_rect);
 
122
  visible_region = meta_region_new_from_rectangle (&screen_rect);
120
123
 
121
124
  for (l = children; l; l = l->next)
122
125
    {
132
135
        continue;
133
136
 
134
137
      /* Temporarily move to the coordinate system of the actor */
135
 
      gdk_region_offset (visible_region, - x, - y);
 
138
      meta_region_translate (visible_region, - x, - y);
136
139
 
137
140
      mutter_window_set_visible_region (cw, visible_region);
138
141
 
139
142
      if (clutter_actor_get_paint_opacity (CLUTTER_ACTOR (cw)) == 0xff)
140
143
        {
141
 
          GdkRegion *obscured_region = mutter_window_get_obscured_region (cw);
 
144
          MetaRegion *obscured_region = mutter_window_get_obscured_region (cw);
142
145
          if (obscured_region)
143
 
            gdk_region_subtract (visible_region, obscured_region);
 
146
            meta_region_subtract (visible_region, obscured_region);
144
147
        }
145
148
 
146
149
      mutter_window_set_visible_region_beneath (cw, visible_region);
147
 
      gdk_region_offset (visible_region, x, y);
 
150
      meta_region_translate (visible_region, x, y);
148
151
    }
149
152
 
150
 
  gdk_region_destroy (visible_region);
 
153
  meta_region_destroy (visible_region);
151
154
 
152
155
  CLUTTER_ACTOR_CLASS (mutter_window_group_parent_class)->paint (actor);
153
156