diff options
author | culler <culler> | 2020-08-21 16:50:17 (GMT) |
---|---|---|
committer | culler <culler> | 2020-08-21 16:50:17 (GMT) |
commit | ddb95ba2c2f24795b20cc4e07b740dd377cc0261 (patch) | |
tree | e1345dc66af6365699a33aca8f92a2e12b5db1e9 /macosx | |
parent | bb6f9b25fe0c1c5356d50b10ec2e6bd2ad284f8b (diff) | |
parent | faecc793509c834b9b7562b4d549d80585ead2d9 (diff) | |
download | tk-ddb95ba2c2f24795b20cc4e07b740dd377cc0261.zip tk-ddb95ba2c2f24795b20cc4e07b740dd377cc0261.tar.gz tk-ddb95ba2c2f24795b20cc4e07b740dd377cc0261.tar.bz2 |
Add the remaining (cosmetic) changes from the mac_clip branch.
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 2d0adc9..aabe103 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) { @@ -978,18 +978,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) { @@ -1041,7 +1041,7 @@ XFillRectangles( int i; display->request++; - if (!TkMacOSXSetupDrawingContext(d, gc, 1, &dc)) { + if (!TkMacOSXSetupDrawingContext(d, gc, &dc)) { return BadDrawable; } if (dc.context) { @@ -1094,7 +1094,7 @@ TkMacOSXDrawSolidBorder( TkMacOSXDrawingContext dc; CGRect outerRect, innerRect; - if (!TkMacOSXSetupDrawingContext(d, gc, 1, &dc)) { + if (!TkMacOSXSetupDrawingContext(d, gc, &dc)) { return; } if (dc.context) { @@ -1146,7 +1146,7 @@ XDrawArc( } display->request++; - if (!TkMacOSXSetupDrawingContext(d, gc, 1, &dc)) { + if (!TkMacOSXSetupDrawingContext(d, gc, &dc)) { return BadDrawable; } if (dc.context) { @@ -1216,7 +1216,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) { @@ -1297,7 +1297,7 @@ XFillArc( } display->request++; - if (!TkMacOSXSetupDrawingContext(d, gc, 1, &dc)) { + if (!TkMacOSXSetupDrawingContext(d, gc, &dc)) { return BadDrawable; } if (dc.context) { @@ -1370,7 +1370,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) { @@ -1551,15 +1551,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. * *---------------------------------------------------------------------- */ @@ -1568,7 +1570,6 @@ Bool TkMacOSXSetupDrawingContext( Drawable d, GC gc, - TCL_UNUSED(int), TkMacOSXDrawingContext *dcPtr) { MacDrawable *macDraw = (MacDrawable *) d; @@ -1577,8 +1578,7 @@ TkMacOSXSetupDrawingContext( TkMacOSXDrawingContext dc = {}; /* - * If the drawable is not a pixmap and it has an associated - * TKContentView 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)) { @@ -1590,7 +1590,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); @@ -1601,8 +1602,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); @@ -1611,9 +1612,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, @@ -1626,11 +1627,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]) { @@ -1640,12 +1648,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); @@ -1655,106 +1663,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); @@ -1765,6 +1764,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 0aab1cf..4ad9118 100644 --- a/macosx/tkMacOSXFont.c +++ b/macosx/tkMacOSXFont.c @@ -1204,7 +1204,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 5440d03..4aea52c 100644 --- a/macosx/tkMacOSXImage.c +++ b/macosx/tkMacOSXImage.c @@ -565,7 +565,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 168ee22..711c3d4 100644 --- a/macosx/tkMacOSXPrivate.h +++ b/macosx/tkMacOSXPrivate.h @@ -263,7 +263,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 3f73b18..06e0402 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 a083e9f..f9da048 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);} |