Commit ea8167d9 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

Fix this for the single-rectangle case. (#326127, Benjamin Berg)

2006-01-08  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkregion-generic.c (miRegionCopy): Fix this for the
	single-rectangle case.  (#326127, Benjamin Berg)
	(gdk_region_copy): Use miRegionCopy() here.
parent 4c194256
2006-01-08 Matthias Clasen <mclasen@redhat.com>
* gdk/gdkregion-generic.c (miRegionCopy): Fix this for the
single-rectangle case. (#326127, Benjamin Berg)
(gdk_region_copy): Use miRegionCopy() here.
2006-01-07 Matthias Clasen <mclasen@redhat.com>
Fix actiongroup-action interaction that relied on
......
2006-01-08 Matthias Clasen <mclasen@redhat.com>
* gdk/gdkregion-generic.c (miRegionCopy): Fix this for the
single-rectangle case. (#326127, Benjamin Berg)
(gdk_region_copy): Use miRegionCopy() here.
2006-01-07 Matthias Clasen <mclasen@redhat.com>
Fix actiongroup-action interaction that relied on
......
......@@ -168,19 +168,9 @@ gdk_region_copy (GdkRegion *region)
g_return_val_if_fail (region != NULL, NULL);
temp = g_slice_new (GdkRegion);
temp->numRects = region->numRects;
temp->extents = region->extents;
temp->size = region->numRects;
temp = gdk_region_new ();
if (region->numRects == 1)
temp->rects = &temp->extents;
else
{
temp->rects = g_new (GdkRegionBox, region->numRects);
memcpy (temp->rects, region->rects, region->numRects * sizeof (GdkRegionBox));
}
miRegionCopy (temp, region);
return temp;
}
......@@ -600,15 +590,20 @@ gdk_region_intersect (GdkRegion *source1,
}
static void
miRegionCopy(GdkRegion *dstrgn, GdkRegion *rgn)
miRegionCopy (GdkRegion *dstrgn,
GdkRegion *rgn)
{
if (dstrgn != rgn) /* don't want to copy to itself */
{
if (dstrgn->size < rgn->numRects)
{
dstrgn->rects = g_renew (GdkRegionBox, dstrgn->rects, rgn->numRects);
if (dstrgn->rects != &dstrgn->extents)
g_free (dstrgn->rects);
dstrgn->rects = g_new (GdkRegionBox, rgn->numRects);
dstrgn->size = rgn->numRects;
}
dstrgn->numRects = rgn->numRects;
dstrgn->extents = rgn->extents;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment