~canonical-dx-team/ubuntu/maverick/gtk+2.0/menuproxy

« back to all changes in this revision

Viewing changes to gdk/quartz/gdkgeometry-quartz.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2009-09-23 09:50:04 UTC
  • mfrom: (1.5.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 129.
  • Revision ID: james.westby@ubuntu.com-20090923095004-e9xauadn4bjs5n7m
Tags: upstream-2.18.0
ImportĀ upstreamĀ versionĀ 2.18.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
                                      gint       dx,
30
30
                                      gint       dy)
31
31
{
 
32
  GdkWindowObject *private = (GdkWindowObject *)window;
 
33
  GdkWindowImplQuartz *impl = (GdkWindowImplQuartz *)private->impl;
 
34
 
 
35
  int i, n_rects;
 
36
  GdkRegion *intersection;
 
37
  GdkRectangle *rects;
 
38
 
 
39
  /* We will intersect the known region that needs display with the given
 
40
   * area.  This intersection will be translated by dx, dy.  For the end
 
41
   * result, we will also set that it needs display.
 
42
   */
 
43
 
 
44
  if (!impl->needs_display_region)
 
45
    return;
 
46
 
 
47
  intersection = gdk_region_copy (impl->needs_display_region);
 
48
  gdk_region_intersect (intersection, area);
 
49
  gdk_region_offset (intersection, dx, dy);
 
50
 
 
51
  gdk_region_get_rectangles (intersection, &rects, &n_rects);
 
52
 
 
53
  for (i = 0; i < n_rects; i++)
 
54
    _gdk_quartz_window_set_needs_display_in_rect (window, &rects[i]);
 
55
 
 
56
  g_free (rects);
 
57
  gdk_region_destroy (intersection);
32
58
}
33
59
 
34
60
gboolean