diff options
author | das <das> | 2007-06-09 17:09:39 (GMT) |
---|---|---|
committer | das <das> | 2007-06-09 17:09:39 (GMT) |
commit | 00da9d704110e07f22779330047d0b99406dd2ce (patch) | |
tree | f359d2dd182768b18f13b4636ebdc5c225ffa0f8 /macosx/tkMacOSXSubwindows.c | |
parent | a700737d94005b30448cf6028feee89c787ed748 (diff) | |
download | tk-00da9d704110e07f22779330047d0b99406dd2ce.zip tk-00da9d704110e07f22779330047d0b99406dd2ce.tar.gz tk-00da9d704110e07f22779330047d0b99406dd2ce.tar.bz2 |
* macosx/tkMacOSXColor.c: fix issues with TK_{IF,ELSE,ENDIF} macros;
* macosx/tkMacOSXDraw.c: implement Jaguar equivalent of unavailable
* macosx/tkMacOSXEntry.c: kHIToolboxVersion global; panic at startup
* macosx/tkMacOSXEvent.c: if MAC_OS_X_VERSION_MIN_REQUIRED constraint
* macosx/tkMacOSXInit.c: is not satisfied.
* macosx/tkMacOSXInt.h:
* macosx/tkMacOSXWm.c:
* macosx/tkMacOSXDraw.c (XCopyArea, XCopyPlane, TkPutImage)
(TkMacOSXSetupDrawingContext): factor out common code and standardize
setup/restore of port, context and clipping; formatting cleanup.
* macosx/tkMacOSXWindowEvent.c: add error checking.
* macosx/tkMacOSXMenu.c: fix gcc3 warning.
* macosx/tkMacOSXScrlbr.c: fix testsuite crash.
* macosx/tkMacOSXSubwindows.c: formatting cleanup.
* macosx/tkMacOSXRegion.c: fix typos.
* macosx/tkMacOSXScale.c:
* macosx/tkMacOSXXStubs.c (Tk_GetUserInactiveTime): remove superfluous
CFRetain/CFRelease.
* macosx/Wish-Release.xcconfig: disable tktest release build stripping.
* macosx/Wish.xcodeproj/project.pbxproj: add new Tclsh-Info.plist.in.
Diffstat (limited to 'macosx/tkMacOSXSubwindows.c')
-rw-r--r-- | macosx/tkMacOSXSubwindows.c | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c index 8691aa0..d5c7616 100644 --- a/macosx/tkMacOSXSubwindows.c +++ b/macosx/tkMacOSXSubwindows.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXSubwindows.c,v 1.21 2007/06/03 13:44:40 das Exp $ + * RCS: @(#) $Id: tkMacOSXSubwindows.c,v 1.22 2007/06/09 17:09:41 das Exp $ */ #include "tkMacOSXInt.h" @@ -688,23 +688,25 @@ void TkMacOSXUpdateClipRgn( TkWindow *winPtr) { + MacDrawable *macWin; + if (winPtr == NULL) { return; } - - if (winPtr->privatePtr && winPtr->privatePtr->flags & TK_CLIP_INVALID) { + macWin = winPtr->privatePtr; + if (macWin && macWin->flags & TK_CLIP_INVALID) { TkWindow *win2Ptr; if (Tk_IsMapped(winPtr)) { int x, y; - RgnHandle rgn = winPtr->privatePtr->aboveClipRgn; + RgnHandle rgn = macWin->aboveClipRgn; /* * Start with a region defined by the window bounds. */ - x = winPtr->privatePtr->xOff; - y = winPtr->privatePtr->yOff; + x = macWin->xOff; + y = macWin->yOff; SetRectRgn(rgn, (short) x, (short) y, (short) (winPtr->changes.width + x), (short) (winPtr->changes.height + y)); @@ -766,8 +768,8 @@ TkMacOSXUpdateClipRgn( * of the embedded window. */ - rgn = winPtr->privatePtr->clipRgn; - CopyRgn(winPtr->privatePtr->aboveClipRgn, rgn); + rgn = macWin->clipRgn; + CopyRgn(macWin->aboveClipRgn, rgn); win2Ptr = winPtr->childList; while (win2Ptr) { if (Tk_IsTopLevel(win2Ptr) || !Tk_IsMapped(win2Ptr)) { @@ -816,17 +818,15 @@ TkMacOSXUpdateClipRgn( TkMacOSXUpdateClipRgn(win2Ptr); } } - SetEmptyRgn(winPtr->privatePtr->aboveClipRgn); - SetEmptyRgn(winPtr->privatePtr->clipRgn); + SetEmptyRgn(macWin->aboveClipRgn); + SetEmptyRgn(macWin->clipRgn); } - winPtr->privatePtr->flags &= ~TK_CLIP_INVALID; + macWin->flags &= ~TK_CLIP_INVALID; #ifdef TK_MAC_DEBUG_CLIP_REGIONS - TkMacOSXDebugFlashRegion(TkMacOSXGetDrawablePort( - (Drawable) winPtr->privatePtr), - ((MacDrawable*) winPtr->privatePtr)->clipRgn); + TkMacOSXDebugFlashRegion(TkMacOSXGetDrawablePort((Drawable) macWin), + macWin->visRgn); #endif /* TK_MAC_DEBUG_CLIP_REGIONS */ - } } @@ -1051,18 +1051,19 @@ TkMacOSXInvalClipRgns( { TkWindow *winPtr = (TkWindow *) tkwin; TkWindow *childPtr; + MacDrawable *macWin = winPtr->privatePtr; /* * If already marked we can stop because all * decendants will also already be marked. */ - if (!winPtr->privatePtr || winPtr->privatePtr->flags & TK_CLIP_INVALID) { + if (!macWin || macWin->flags & TK_CLIP_INVALID) { return; } - winPtr->privatePtr->flags |= TK_CLIP_INVALID; - SetEmptyRgn(winPtr->privatePtr->aboveClipRgn); - SetEmptyRgn(winPtr->privatePtr->clipRgn); + macWin->flags |= TK_CLIP_INVALID; + SetEmptyRgn(macWin->aboveClipRgn); + SetEmptyRgn(macWin->clipRgn); /* * Invalidate clip regions for all children & |