diff options
Diffstat (limited to 'macosx/tkMacOSXDraw.c')
-rw-r--r-- | macosx/tkMacOSXDraw.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index 6631b4f..3a3e288 100644 --- a/macosx/tkMacOSXDraw.c +++ b/macosx/tkMacOSXDraw.c @@ -18,7 +18,6 @@ #include "tkMacOSXDebug.h" #include "xbytes.h" - /* #ifdef TK_MAC_DEBUG #define TK_MAC_DEBUG_DRAWING @@ -146,7 +145,7 @@ BitmapRepFromDrawableRect( NSBitmapImageRep *bitmap_rep=NULL; NSView *view=NULL; if ( mac_drawable->flags & TK_IS_PIXMAP ) { - /* + /* This means that the MacDrawable is functioning as a Tk Pixmap, so its view field is NULL. It's context field should point to a CGImage. */ @@ -1480,7 +1479,7 @@ TkScrollWindow( TkRegion damageRgn) /* Region to accumulate damage in. */ { Drawable drawable = Tk_WindowId(tkwin); - MacDrawable *macDraw = (MacDrawable *) drawable; + MacDrawable *macDraw = (MacDrawable *) drawable; NSView *view = TkMacOSXDrawableView(macDraw); CGRect visRect, srcRect, dstRect, scroll_src, scroll_dst; HIShapeRef dmgRgn = NULL; @@ -1491,7 +1490,7 @@ TkScrollWindow( /* Get the scroll area in NSView coordinates (origin at bottom left). */ bounds = [view bounds]; scroll_src = CGRectMake( - macDraw->xOff + x, + macDraw->xOff + x, bounds.size.height - height - (macDraw->yOff + y), width, height); scroll_dst = CGRectOffset(scroll_src, dx, -dy); @@ -1537,7 +1536,7 @@ TkScrollWindow( * them as damaged. Use Tk coordinates, shifted to account for the * future scrolling. */ - + for (NSView *subview in [view subviews] ) { NSRect frame = [subview frame]; CGRect subviewRect = CGRectMake( @@ -1555,15 +1554,12 @@ TkScrollWindow( CFRelease(dstRgn); } } - } } - if ( dmgRgn == NULL ) { dmgRgn = HIShapeCreateEmpty(); } - TkMacOSXSetWithNativeRegion(damageRgn, dmgRgn); result = HIShapeIsEmpty(dmgRgn) ? 0 : 1; CFRelease(dmgRgn); |