summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXXStubs.c
diff options
context:
space:
mode:
authordas <das>2007-10-12 03:13:55 (GMT)
committerdas <das>2007-10-12 03:13:55 (GMT)
commitd0945ac2cb3d92090109d0c3899b51284660db69 (patch)
tree19db4bde02cd865bf8f7eeedf826c2080de5b5f8 /macosx/tkMacOSXXStubs.c
parent9c32b5375f1e358956e32a2df5cd9c71fc164ba1 (diff)
downloadtk-d0945ac2cb3d92090109d0c3899b51284660db69.zip
tk-d0945ac2cb3d92090109d0c3899b51284660db69.tar.gz
tk-d0945ac2cb3d92090109d0c3899b51284660db69.tar.bz2
* xlib/xgc.c: factor out alloc/free of GC clip_mask;
* macosx/tkMacOSXXStubs.c: manage clip rgn lifetime with new Tkp{Retain,Release}Region().
Diffstat (limited to 'macosx/tkMacOSXXStubs.c')
-rw-r--r--macosx/tkMacOSXXStubs.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c
index 31ae7ea..78bd909 100644
--- a/macosx/tkMacOSXXStubs.c
+++ b/macosx/tkMacOSXXStubs.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXXStubs.c,v 1.23 2007/07/04 17:32:39 andreas_kupries Exp $
+ * RCS: @(#) $Id: tkMacOSXXStubs.c,v 1.24 2007/10/12 03:13:55 das Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -706,15 +706,7 @@ XSetClipRectangles(
int n,
int ordering)
{
- TkRegion clipRgn;
-
- if (gc->clip_mask && ((TkpClipMask*)gc->clip_mask)->type
- == TKP_CLIP_REGION) {
- clipRgn = ((TkpClipMask*)gc->clip_mask)->value.region;
- SetEmptyRgn((RgnHandle) clipRgn);
- } else {
- clipRgn = TkCreateRegion(); /* LEAK! */
- }
+ TkRegion clipRgn = TkCreateRegion();
while (n--) {
XRectangle rect = *rectangles;
@@ -725,6 +717,7 @@ XSetClipRectangles(
rectangles++;
}
TkSetRegion(d, gc, clipRgn);
+ TkDestroyRegion(clipRgn);
return 1;
}
#endif