diff options
author | culler <culler> | 2020-08-21 16:26:16 (GMT) |
---|---|---|
committer | culler <culler> | 2020-08-21 16:26:16 (GMT) |
commit | 7e85fa97e34d903e8b4599127e14838a49856360 (patch) | |
tree | 53965d7fc969b8a389828c9dbbbc5b0152bd9346 /macosx | |
parent | acea84f433c2b5120598536b28215c84c4a74f31 (diff) | |
download | tk-7e85fa97e34d903e8b4599127e14838a49856360.zip tk-7e85fa97e34d903e8b4599127e14838a49856360.tar.gz tk-7e85fa97e34d903e8b4599127e14838a49856360.tar.bz2 |
Edit comments, make some stylistic changes, remove an unused function parameter.
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXBitmap.c | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXButton.c | 4 | ||||
-rw-r--r-- | macosx/tkMacOSXDraw.c | 240 | ||||
-rw-r--r-- | macosx/tkMacOSXEntry.c | 4 | ||||
-rw-r--r-- | macosx/tkMacOSXFont.c | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXImage.c | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXMenubutton.c | 4 | ||||
-rw-r--r-- | macosx/tkMacOSXPrivate.h | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXScrlbr.c | 2 | ||||
-rw-r--r-- | macosx/ttkMacOSXTheme.c | 2 |
10 files changed, 132 insertions, 132 deletions
diff --git a/macosx/tkMacOSXBitmap.c b/macosx/tkMacOSXBitmap.c index c1b325a..213d925 100644 --- a/macosx/tkMacOSXBitmap.c +++ b/macosx/tkMacOSXBitmap.c @@ -136,7 +136,7 @@ PixmapFromImage( Pixmap pixmap; pixmap = Tk_GetPixmap(display, None, size.width, size.height, 0); - if (TkMacOSXSetupDrawingContext(pixmap, NULL, 1, &dc)) { + if (TkMacOSXSetupDrawingContext(pixmap, NULL, &dc)) { if (dc.context) { CGAffineTransform t = { .a = 1, .b = 0, .c = 0, .d = -1, .tx = 0, .ty = size.height}; diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c index 9f60b91..857ce34 100644 --- a/macosx/tkMacOSXButton.c +++ b/macosx/tkMacOSXButton.c @@ -744,7 +744,7 @@ TkMacOSXDrawButton( ButtonBackgroundDrawCB(&cntrRect, mbPtr, 32, true); - if (!TkMacOSXSetupDrawingContext(pixmap, dpPtr->gc, 1, &dc)) { + if (!TkMacOSXSetupDrawingContext(pixmap, dpPtr->gc, &dc)) { return; } @@ -777,7 +777,7 @@ TkMacOSXDrawButton( ButtonContentDrawCB(&contHIRec, mbPtr->btnkind, &mbPtr->drawinfo, (MacButton *) mbPtr, 32, true); } else { - if (!TkMacOSXSetupDrawingContext(pixmap, dpPtr->gc, 1, &dc)) { + if (!TkMacOSXSetupDrawingContext(pixmap, dpPtr->gc, &dc)) { return; } diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index a5c087b..24eb380 100644 --- a/macosx/tkMacOSXDraw.c +++ b/macosx/tkMacOSXDraw.c @@ -250,7 +250,7 @@ XCopyArea( return BadDrawable; } - if (!TkMacOSXSetupDrawingContext(dst, gc, 1, &dc)) { + if (!TkMacOSXSetupDrawingContext(dst, gc, &dc)) { TkMacOSXDbgMsg("Failed to setup drawing context."); return BadDrawable; } @@ -332,7 +332,7 @@ XCopyPlane( Tcl_Panic("Unexpected plane specified for XCopyPlane"); } if (srcDraw->flags & TK_IS_PIXMAP) { - if (!TkMacOSXSetupDrawingContext(dst, gc, 1, &dc)) { + if (!TkMacOSXSetupDrawingContext(dst, gc, &dc)) { return BadDrawable; } @@ -753,7 +753,7 @@ XDrawLines( } display->request++; - if (!TkMacOSXSetupDrawingContext(d, gc, 1, &dc)) { + if (!TkMacOSXSetupDrawingContext(d, gc, &dc)) { return BadDrawable; } if (dc.context) { @@ -821,7 +821,7 @@ XDrawSegments( int i, lw = gc->line_width; display->request++; - if (!TkMacOSXSetupDrawingContext(d, gc, 1, &dc)) { + if (!TkMacOSXSetupDrawingContext(d, gc, &dc)) { return BadDrawable; } if (dc.context) { @@ -873,7 +873,7 @@ XFillPolygon( int i; display->request++; - if (!TkMacOSXSetupDrawingContext(d, gc, 1, &dc)) { + if (!TkMacOSXSetupDrawingContext(d, gc, &dc)) { return BadDrawable; } if (dc.context) { @@ -935,7 +935,7 @@ XDrawRectangle( } display->request++; - if (!TkMacOSXSetupDrawingContext(d, gc, 1, &dc)) { + if (!TkMacOSXSetupDrawingContext(d, gc, &dc)) { return BadDrawable; } if (dc.context) { @@ -979,18 +979,18 @@ XDrawRectangle( int XDrawRectangles( Display *display, - Drawable drawable, + Drawable d, GC gc, XRectangle *rectArr, int nRects) { - MacDrawable *macWin = (MacDrawable *) drawable; + MacDrawable *macWin = (MacDrawable *) d; TkMacOSXDrawingContext dc; XRectangle * rectPtr; int i, lw = gc->line_width; display->request++; - if (!TkMacOSXSetupDrawingContext(drawable, gc, 1, &dc)) { + if (!TkMacOSXSetupDrawingContext(d, gc, &dc)) { return BadDrawable; } if (dc.context) { @@ -1043,7 +1043,7 @@ XFillRectangles( int i; display->request++; - if (!TkMacOSXSetupDrawingContext(d, gc, 1, &dc)) { + if (!TkMacOSXSetupDrawingContext(d, gc, &dc)) { return BadDrawable; } if (dc.context) { @@ -1096,7 +1096,7 @@ TkMacOSXDrawSolidBorder( TkMacOSXDrawingContext dc; CGRect outerRect, innerRect; - if (!TkMacOSXSetupDrawingContext(d, gc, 1, &dc)) { + if (!TkMacOSXSetupDrawingContext(d, gc, &dc)) { return; } if (dc.context) { @@ -1148,7 +1148,7 @@ XDrawArc( } display->request++; - if (!TkMacOSXSetupDrawingContext(d, gc, 1, &dc)) { + if (!TkMacOSXSetupDrawingContext(d, gc, &dc)) { return BadDrawable; } if (dc.context) { @@ -1219,7 +1219,7 @@ XDrawArcs( int i, lw = gc->line_width; display->request++; - if (!TkMacOSXSetupDrawingContext(d, gc, 1, &dc)) { + if (!TkMacOSXSetupDrawingContext(d, gc, &dc)) { return BadDrawable; } if (dc.context) { @@ -1301,7 +1301,7 @@ XFillArc( } display->request++; - if (!TkMacOSXSetupDrawingContext(d, gc, 1, &dc)) { + if (!TkMacOSXSetupDrawingContext(d, gc, &dc)) { return BadDrawable; } if (dc.context) { @@ -1375,7 +1375,7 @@ XFillArcs( int i, lw = gc->line_width; display->request++; - if (!TkMacOSXSetupDrawingContext(d, gc, 1, &dc)) { + if (!TkMacOSXSetupDrawingContext(d, gc, &dc)) { return BadDrawable; } if (dc.context) { @@ -1574,15 +1574,17 @@ TkMacOSXSetUpGraphicsPort( * * TkMacOSXSetUpDrawingContext -- * - * Set up a drawing context for the given drawable and GC. + * Set up a drawing context for the given drawable from an X GC. * * Results: - * Boolean indicating whether it is ok to draw; if false, drawing context - * was not setup, so do not attempt to draw and do not call + * Boolean indicating whether it is ok to draw; if false, the drawing + * context was not setup, so do not attempt to draw and do not call * TkMacOSXRestoreDrawingContext(). * * Side effects: - * None. + * May modify or create the drawable's graphics context. May expand the + * drawable's dirty rectangle. When the result is true The dcPtr + * parameter is set to reference the new or updated drawing context. * *---------------------------------------------------------------------- */ @@ -1591,7 +1593,6 @@ Bool TkMacOSXSetupDrawingContext( Drawable d, GC gc, - TCL_UNUSED(int), TkMacOSXDrawingContext *dcPtr) { MacDrawable *macDraw = (MacDrawable *) d; @@ -1600,8 +1601,7 @@ TkMacOSXSetupDrawingContext( TkMacOSXDrawingContext dc = {}; /* - * If the drawable is not a pixmap and it has an associated NSWindow then - * we know we are drawing to a window. + * If the drawable is not a pixmap, get the associated NSView. */ if (!(macDraw->flags & TK_IS_PIXMAP)) { @@ -1613,7 +1613,8 @@ TkMacOSXSetupDrawingContext( } /* - * Check that we have a non-empty clipping region. + * Intersect the drawable's clipping region with the region stored in the + * X GC. If the resulting region is empty, don't do any drawing. */ dc.clipRgn = TkMacOSXGetClipRgn(d); @@ -1624,8 +1625,8 @@ TkMacOSXSetupDrawingContext( } /* - * If we already have a CGContext, use it. Otherwise, if we are drawing to - * a window then we can get one from the window. + * If the drawable already has a CGContext, use it. Otherwise, we must be + * drawing to a window and we use the current context of its ContentView. */ dc.context = TkMacOSXGetCGContextForDrawable(d); @@ -1634,9 +1635,9 @@ TkMacOSXSetupDrawingContext( } else { NSRect drawingBounds, currentBounds; - dc.portBounds = NSRectToCGRect([view bounds]); - dc.context = GET_CGCONTEXT; dc.view = view; + dc.context = GET_CGCONTEXT; + dc.portBounds = NSRectToCGRect([view bounds]); if (dc.clipRgn) { CGRect clipBounds; CGAffineTransform t = { .a = 1, .b = 0, .c = 0, .d = -1, .tx = 0, @@ -1649,11 +1650,18 @@ TkMacOSXSetupDrawingContext( } /* - * We can only draw into the view when the current CGContext is valid - * and belongs to the view. Validity can only be guaranteed inside of - * a view's drawRect or setFrame methods. The isDrawing attribute - * tells us whether we are being called from drawRect. If the - * CGContext is not valid then we mark our view as needing display. + * We can only draw into the NSView which is the current focusView. + * When the current [NSView focusView] is nil, the CGContext for + * [NSGraphicsContext currentContext] is nil. Otherwise the current + * CGContext draws into the current focusView. An NSView is guaranteed + * to be the focusView when its drawRect or setFrame methods are + * running. Prior to OSX 10.14 it was also possible to call the + * lockFocus method to force an NSView to become the current focusView. + * But that method was deprecated in 10.14 and so is no longer used by + * Tk. Instead, if the view is not the current focusView then we add + * the drawing bounds to its dirty rectangle and return false. The + * part of the view inside the drawing bounds will get redrawn during + * the next call to its drawRect method. */ if (view != [NSView focusView]) { @@ -1663,12 +1671,12 @@ TkMacOSXSetupDrawingContext( } /* - * Drawing will also fail if we are being called from drawRect but the - * clipping rectangle set by drawRect does not contain the clipping - * region of our drawing context. See bug [2a61eca3a8]. If we can't - * draw all of the clipping region of the drawing context then we draw - * whatever we can, but we also add a dirty rectangle so the entire - * widget will get redrawn in the next cycle. + * Drawing will also fail when the view is the current focusView but + * the clipping rectangle set by drawRect does not contain the clipping + * region of our drawing context. (See bug [2a61eca3a8].) If part of + * the drawing bounds will be clipped then we draw whatever we can, but + * we also add the drawing bounds to the view's dirty rectangle so it + * will get redrawn in the next call to its drawRect method. */ currentBounds = CGContextGetClipBoundingBox(dc.context); @@ -1678,106 +1686,97 @@ TkMacOSXSetupDrawingContext( } /* - * Configure the drawing context. + * Finish configuring the drawing context. */ - if (dc.context) { - CGAffineTransform t = { - .a = 1, .b = 0, - .c = 0, .d = -1, - .tx = 0, - .ty = dc.portBounds.size.height - }; + CGAffineTransform t = { + .a = 1, .b = 0, + .c = 0, .d = -1, + .tx = 0, + .ty = dc.portBounds.size.height + }; - dc.portBounds.origin.x += macDraw->xOff; - dc.portBounds.origin.y += macDraw->yOff; - CGContextSaveGState(dc.context); - CGContextSetTextDrawingMode(dc.context, kCGTextFill); - CGContextConcatCTM(dc.context, t); - if (dc.clipRgn) { + dc.portBounds.origin.x += macDraw->xOff; + dc.portBounds.origin.y += macDraw->yOff; + CGContextSaveGState(dc.context); + CGContextSetTextDrawingMode(dc.context, kCGTextFill); + CGContextConcatCTM(dc.context, t); + if (dc.clipRgn) { #ifdef TK_MAC_DEBUG_DRAWING - CGContextSaveGState(dc.context); - ChkErr(HIShapeReplacePathInCGContext, dc.clipRgn, dc.context); - CGContextSetRGBFillColor(dc.context, 1.0, 0.0, 0.0, 0.1); - CGContextEOFillPath(dc.context); - CGContextRestoreGState(dc.context); + CGContextSaveGState(dc.context); + ChkErr(HIShapeReplacePathInCGContext, dc.clipRgn, dc.context); + CGContextSetRGBFillColor(dc.context, 1.0, 0.0, 0.0, 0.1); + CGContextEOFillPath(dc.context); + CGContextRestoreGState(dc.context); #endif /* TK_MAC_DEBUG_DRAWING */ - CGRect b = CGRectApplyAffineTransform( - CGContextGetClipBoundingBox(dc.context), t); - CGRect r; + CGRect r; + CGRect b = CGRectApplyAffineTransform( + CGContextGetClipBoundingBox(dc.context), t); + if (!HIShapeIsRectangular(dc.clipRgn) || + !CGRectContainsRect(*HIShapeGetBounds(dc.clipRgn, &r), b)) { + ChkErr(HIShapeReplacePathInCGContext, dc.clipRgn, dc.context); + CGContextEOClip(dc.context); + } + } + if (gc) { + static const CGLineCap cgCap[] = { + [CapNotLast] = kCGLineCapButt, + [CapButt] = kCGLineCapButt, + [CapRound] = kCGLineCapRound, + [CapProjecting] = kCGLineCapSquare, + }; + static const CGLineJoin cgJoin[] = { + [JoinMiter] = kCGLineJoinMiter, + [JoinRound] = kCGLineJoinRound, + [JoinBevel] = kCGLineJoinBevel, + }; + bool shouldAntialias = !notAA(gc->line_width); + double w = gc->line_width; - if (!HIShapeIsRectangular(dc.clipRgn) || - !CGRectContainsRect(*HIShapeGetBounds(dc.clipRgn, &r), b)) { - ChkErr(HIShapeReplacePathInCGContext, dc.clipRgn, dc.context); - CGContextEOClip(dc.context); - } + TkMacOSXSetColorInContext(gc, gc->foreground, dc.context); + if (view) { + CGContextSetPatternPhase(dc.context, CGSizeMake( + dc.portBounds.size.width, dc.portBounds.size.height)); } - if (gc) { - static const CGLineCap cgCap[] = { - [CapNotLast] = kCGLineCapButt, - [CapButt] = kCGLineCapButt, - [CapRound] = kCGLineCapRound, - [CapProjecting] = kCGLineCapSquare, - }; - static const CGLineJoin cgJoin[] = { - [JoinMiter] = kCGLineJoinMiter, - [JoinRound] = kCGLineJoinRound, - [JoinBevel] = kCGLineJoinBevel, - }; - bool shouldAntialias; - double w = gc->line_width; - - TkMacOSXSetColorInContext(gc, gc->foreground, dc.context); - if (view) { - CGContextSetPatternPhase(dc.context, CGSizeMake( - dc.portBounds.size.width, dc.portBounds.size.height)); - } - if (gc->function != GXcopy) { - TkMacOSXDbgMsg("Logical functions other than GXcopy are " - "not supported for CG drawing!"); - } + if (gc->function != GXcopy) { + TkMacOSXDbgMsg("Logical functions other than GXcopy are " + "not supported for CG drawing!"); + } + if (!shouldAntialias) { /* - * When should we antialias? + * Make non-antialiased CG drawing look more like X11. */ - shouldAntialias = !notAA(gc->line_width); - if (!shouldAntialias) { - /* - * Make non-antialiased CG drawing look more like X11. - */ - - w -= (gc->line_width ? NON_AA_CG_OFFSET : 0); - } - CGContextSetShouldAntialias(dc.context, shouldAntialias); - CGContextSetLineWidth(dc.context, w); - if (gc->line_style != LineSolid) { - int num = 0; - char *p = &gc->dashes; - CGFloat dashOffset = gc->dash_offset; - dashOffset -= (gc->line_width % 2) ? 0.5 : 0.0; - CGFloat lengths[10]; - - while (p[num] != '\0' && num < 10) { - lengths[num] = p[num]; - num++; - } - CGContextSetLineDash(dc.context, dashOffset, lengths, num); - } - if ((unsigned) gc->cap_style < sizeof(cgCap)/sizeof(CGLineCap)) { - CGContextSetLineCap(dc.context, - cgCap[(unsigned) gc->cap_style]); - } - if ((unsigned)gc->join_style < sizeof(cgJoin)/sizeof(CGLineJoin)) { - CGContextSetLineJoin(dc.context, - cgJoin[(unsigned) gc->join_style]); + w -= (gc->line_width ? NON_AA_CG_OFFSET : 0); + } + CGContextSetShouldAntialias(dc.context, shouldAntialias); + CGContextSetLineWidth(dc.context, w); + if (gc->line_style != LineSolid) { + int num = 0; + char *p = &gc->dashes; + CGFloat dashOffset = gc->dash_offset; + dashOffset -= (gc->line_width % 2) ? 0.5 : 0.0; + CGFloat lengths[10]; + + while (p[num] != '\0' && num < 10) { + lengths[num] = p[num]; + num++; } + CGContextSetLineDash(dc.context, dashOffset, lengths, num); + } + if ((unsigned) gc->cap_style < sizeof(cgCap)/sizeof(CGLineCap)) { + CGContextSetLineCap(dc.context, cgCap[(unsigned) gc->cap_style]); + } + if ((unsigned)gc->join_style < sizeof(cgJoin)/sizeof(CGLineJoin)) { + CGContextSetLineJoin(dc.context, cgJoin[(unsigned) gc->join_style]); } } end: + #ifdef TK_MAC_DEBUG_DRAWING if (!canDraw && win != NULL) { TkWindow *winPtr = TkMacOSXGetTkWindow(win); @@ -1788,6 +1787,7 @@ end: } } #endif + if (!canDraw && dc.clipRgn) { CFRelease(dc.clipRgn); dc.clipRgn = NULL; diff --git a/macosx/tkMacOSXEntry.c b/macosx/tkMacOSXEntry.c index 7915f6f..c6f4eea 100644 --- a/macosx/tkMacOSXEntry.c +++ b/macosx/tkMacOSXEntry.c @@ -155,7 +155,7 @@ TkpDrawEntryBorderAndFocus( bounds.origin.y = macDraw->yOff + MAC_OSX_FOCUS_WIDTH; bounds.size.width = Tk_Width(tkwin) - 2*MAC_OSX_FOCUS_WIDTH; bounds.size.height = Tk_Height(tkwin) - 2*MAC_OSX_FOCUS_WIDTH; - if (!TkMacOSXSetupDrawingContext(d, NULL, 1, &dc)) { + if (!TkMacOSXSetupDrawingContext(d, NULL, &dc)) { /* * No graphics context is available. If the widget is a Spinbox, we @@ -265,7 +265,7 @@ TkpDrawSpinboxButtons( rects[0].height = Tk_Height(tkwin); XFillRectangles(Tk_Display(tkwin), d, bgGC, rects, 1); - if (!TkMacOSXSetupDrawingContext(d, NULL, 1, &dc)) { + if (!TkMacOSXSetupDrawingContext(d, NULL, &dc)) { return 0; } ChkErr(HIThemeDrawButton, &bounds, &info, dc.context, HIOrientation, NULL); diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c index 581ada1..f58e831 100644 --- a/macosx/tkMacOSXFont.c +++ b/macosx/tkMacOSXFont.c @@ -1199,7 +1199,7 @@ TkpDrawAngledCharsInContext( if (rangeStart < 0 || rangeLength <= 0 || rangeStart + rangeLength > numBytes || - !TkMacOSXSetupDrawingContext(drawable, gc, 1, &drawingContext)) { + !TkMacOSXSetupDrawingContext(drawable, gc, &drawingContext)) { return; } string = [[TKNSString alloc] initWithTclUtfBytes:source length:numBytes]; diff --git a/macosx/tkMacOSXImage.c b/macosx/tkMacOSXImage.c index 0e33b23..f7dbb70 100644 --- a/macosx/tkMacOSXImage.c +++ b/macosx/tkMacOSXImage.c @@ -558,7 +558,7 @@ XPutImage( MacDrawable *macDraw = (MacDrawable *) drawable; display->request++; - if (!TkMacOSXSetupDrawingContext(drawable, gc, 1, &dc)) { + if (!TkMacOSXSetupDrawingContext(drawable, gc, &dc)) { return BadDrawable; } if (dc.context) { diff --git a/macosx/tkMacOSXMenubutton.c b/macosx/tkMacOSXMenubutton.c index 8eed4f0..320c070 100644 --- a/macosx/tkMacOSXMenubutton.c +++ b/macosx/tkMacOSXMenubutton.c @@ -560,7 +560,7 @@ TkMacOSXDrawMenuButton( static HIThemeButtonDrawInfo hiinfo; MenuButtonBackgroundDrawCB(mbPtr, 32, true); - if (!TkMacOSXSetupDrawingContext(pixmap, dpPtr->gc, 1, &dc)) { + if (!TkMacOSXSetupDrawingContext(pixmap, dpPtr->gc, &dc)) { return; } @@ -591,7 +591,7 @@ TkMacOSXDrawMenuButton( MenuButtonContentDrawCB(mbPtr->btnkind, &mbPtr->drawinfo, mbPtr, 32, true); } else { - if (!TkMacOSXSetupDrawingContext(pixmap, dpPtr->gc, 1, &dc)) { + if (!TkMacOSXSetupDrawingContext(pixmap, dpPtr->gc, &dc)) { return; } TkMacOSXRestoreDrawingContext(&dc); diff --git a/macosx/tkMacOSXPrivate.h b/macosx/tkMacOSXPrivate.h index a6b988e..5c4ae7d 100644 --- a/macosx/tkMacOSXPrivate.h +++ b/macosx/tkMacOSXPrivate.h @@ -262,7 +262,7 @@ MODULE_SCOPE void TkMacOSXDrawCGImage(Drawable d, GC gc, CGContextRef cont unsigned long imageBackground, CGRect imageBounds, CGRect srcBounds, CGRect dstBounds); MODULE_SCOPE int TkMacOSXSetupDrawingContext(Drawable d, GC gc, - int useCG, TkMacOSXDrawingContext *dcPtr); + TkMacOSXDrawingContext *dcPtr); MODULE_SCOPE void TkMacOSXRestoreDrawingContext( TkMacOSXDrawingContext *dcPtr); MODULE_SCOPE void TkMacOSXSetColorInContext(GC gc, unsigned long pixel, diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c index 8bf2998..8565e76 100644 --- a/macosx/tkMacOSXScrlbr.c +++ b/macosx/tkMacOSXScrlbr.c @@ -263,7 +263,7 @@ TkpDisplayScrollbar( if ((view == NULL) || (macWin->flags & TK_DO_NOT_DRAW) - || !TkMacOSXSetupDrawingContext((Drawable) macWin, NULL, 1, &dc)) { + || !TkMacOSXSetupDrawingContext((Drawable) macWin, NULL, &dc)) { return; } diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c index b0be4e9..2734c63 100644 --- a/macosx/ttkMacOSXTheme.c +++ b/macosx/ttkMacOSXTheme.c @@ -39,7 +39,7 @@ #define BEGIN_DRAWING(d) { \ TkMacOSXDrawingContext dc; \ - if (!TkMacOSXSetupDrawingContext((d), NULL, 1, &dc)) {return;} + if (!TkMacOSXSetupDrawingContext((d), NULL, &dc)) {return;} #define END_DRAWING \ TkMacOSXRestoreDrawingContext(&dc);} |